Skip to content

OBPIH-6631 Add a bit more comments in product merge service#4883

Merged
awalkowiak merged 1 commit intodevelopfrom
OBPIH-6631
Oct 9, 2024
Merged

OBPIH-6631 Add a bit more comments in product merge service#4883
awalkowiak merged 1 commit intodevelopfrom
OBPIH-6631

Conversation

@awalkowiak
Copy link
Collaborator

✨ 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

@github-actions github-actions bot added the domain: backend Changes or discussions relating to the backend server label Oct 8, 2024
// 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)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe it will be worth creating a ticket for checking that and removing if this is unnecessary?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

// 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)
Copy link
Collaborator

Choose a reason for hiding this comment

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

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

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.

@awalkowiak awalkowiak merged commit 5806620 into develop Oct 9, 2024
@awalkowiak awalkowiak deleted the OBPIH-6631 branch October 9, 2024 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain: backend Changes or discussions relating to the backend server

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants