-
Notifications
You must be signed in to change notification settings - Fork 349
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
Fetching an aggregate root-entity-set chain results in wrong data for the set #1802
Comments
spring-projects-issues
added
the
status: waiting-for-triage
An issue we've not yet triaged
label
Jun 3, 2024
Converting the Second record to a class with setters fixes the problem. Immutable class also has this bug. |
schauder
added
type: regression
A regression from a previous release
and removed
status: waiting-for-triage
An issue we've not yet triaged
labels
Jun 7, 2024
schauder
added a commit
that referenced
this issue
Jun 7, 2024
In an aggregate A->B-Collection<C> a select gets executed for loading Collection<C>. That select used the wrong ID when B had an ID with the same name as A. This is now fixed. Closes #1802
This was referenced Jun 7, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Check the attached example project. Run DemoApplicationTests to see the problem. I noticed this on Spring Data JDBC 3.2.5. Also applies to 3.3.0. 3.1.12 works as expected. It seems to me that the id of the root table is erroneously used for fetching the set. This is highly dangerous as wrong data is returned and if the returned aggregate is saved back to the database then the wrong set data is persisted.
bug.zip
The text was updated successfully, but these errors were encountered: