OBPIH-6631 Add a bit more comments in product merge service#4883
Conversation
| // Swap assemblyProduct to primary | ||
| obsoletedComponent.assemblyProduct = primary | ||
| // Note: needs flush because of "User.locationRoles not processed by flush" | ||
| // (this was an issue on grails 1.3.9, might not be a case anymore) |
There was a problem hiding this comment.
Maybe it will be worth creating a ticket for checking that and removing if this is unnecessary?
There was a problem hiding this comment.
Added it to this one https://pihemr.atlassian.net/browse/OBPIH-5484
| // Swap assemblyProduct to primary | ||
| obsoletedComponent.assemblyProduct = primary | ||
| // Note: needs flush because of "User.locationRoles not processed by flush" | ||
| // (this was an issue on grails 1.3.9, might not be a case anymore) |
There was a problem hiding this comment.
nitpicky and not related/not important now, but I'm actually curious why User.locationRoles would even have an impact on those saves + if we were to remove the flush, we could get rid of those explicit saves at all, as we update an existing entity and all of the changes are tracked by Hibernate
There was a problem hiding this comment.
Feels like, the "User.locationRoles not processed by flush" was often issue in the past, but what was the core of it I don't know/remember.
✨ Description of Change
Link to GitHub issue or Jira ticket:
https://pihemr.atlassian.net/browse/OBPIH-6631
Description:
A bit of comments in the product merge service