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.
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
Make sure to read association configuration again from annotations if it was cleared #5489
Make sure to read association configuration again from annotations if it was cleared #5489
Changes from 4 commits
ea974d7
7860dc4
40d8142
f9b0052
660f6e8
eb8bfb9
0d00a2f
0fb9923
90352a6
8c113d8
e9b9663
b6bd14b
1d93178
9c8ce24
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I'm not sure to understand.
assocConfs
is not persisted, I think it is expected for it to be empty beforeFetchWithAssociations
kicks in ?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue happens after FetchWithAssociations, when the resource is updated, it resets the map. This test shows that if it is reset after
SetAssociationConf()
, the map is repopulated on the fly byAssociationConf()
.Maybe I should go further and delete
SetAssociationConf()
to avoid confusion. We could even delete theFetchWithAssociations()
and just rely onAssociationConf()
called in different places.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the clarification ! My understanding is that it means that
FetchWithAssociations
is unreliable 😕 I wonder if it's really worth keeping it along with the unserialized annotations ? IIUC they are only here to spare a few CPU cycles by not usingjson.Unmarshal
when the association config. is needed ?