OBPIH-6153 Fix assigning bidirectional association between Picklist a…#4618
Merged
awalkowiak merged 1 commit intofeature/upgrade-to-grails-3.3.10from May 15, 2024
Merged
Conversation
alannadolny
approved these changes
May 14, 2024
ewaterman
approved these changes
May 14, 2024
drodzewicz
approved these changes
May 14, 2024
jmiranda
requested changes
May 15, 2024
Member
jmiranda
left a comment
There was a problem hiding this comment.
Don't merge this. Let's discuss on the tech huddle tomorrow.
jmiranda
approved these changes
May 15, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…nd Requisition
TL:DR - we've been living with this bug forever, but it has not been yet noticed, because we have not returned the
picklistin thetoJsonof theStockMovement, that I've added recently.The problem is that the 1:1 association between requisition and picklist has been missing one part - we set the requisition for the picklist, but we don't set the picklist for the requisition - that caused an issue that when serializing the stock movement (in toJson), the requisition's picklist is in fact
null.The missing association is obviously detected and added automatically by Hibernate, but after the session is closed, so after refreshing the page and re-fetching the SM, everything works correctly, because the association is added, but it didn't work (picklist was treated as null) when returning the SM from the initial request.
If anyone is interested in details of that issue, let me know, so I can explain it in more details or record a video with the debugger, but I hope it is kinda self-explanatory.