Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SAK-49285 msgcntr oracle restriction unique violated SYS_C00508178 #11916

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jesusmmp
Copy link
Contributor

@jesusmmp jesusmmp marked this pull request as draft September 19, 2023 09:37
boolean isNew = topic.getId() == null;

topic.setModified(new Date());
if(userId != null){
topic.setModifiedBy(userId);
}
getHibernateTemplate().saveOrUpdate(topic);
topic = getHibernateTemplate().merge(topic);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is good idea to treat topic as final and simply create a new var called "mergedTopic", it is clearer about what happened.

Comment on lines +1178 to 1180
forum = getHibernateTemplate().merge(forum);
area = getHibernateTemplate().merge(area);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here use mergedForum and mergedArea

Comment on lines +308 to +309
newItems.add(item);
newItems = saveSynopticMsgcntrItems(newItems);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this code could be less confusing newItems is never used in the way that it is declared at the top of the method.

Comment on lines -348 to +353
saveSynopticMsgcntrItems(Arrays.asList(item));
newItems.add(item);
newItems = saveSynopticMsgcntrItems(newItems);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as previous method

Copy link
Contributor

@ern ern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jesusmmp looks pretty good just a few minor suggestions

@ottenhoff
Copy link
Contributor

@jesusmmp are you interested in getting this merged?

@jesusmmp
Copy link
Contributor Author

I'll fix this PR in the summer

@ern ern changed the title SAK-49285 Restriction unique violated SYS_C00508178 SAK-49285 msgcntr oracle restriction unique violated SYS_C00508178 Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants