-
Notifications
You must be signed in to change notification settings - Fork 356
One-to-many relation: ResultSet contains ... multiple times #1073
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
Labels
type: enhancement
A general enhancement
Comments
schauder
added a commit
that referenced
this issue
Oct 21, 2021
When the key column of a MappedCollection is also present in the contained entity that column got select twice. We now check if the column already gets selected before adding it to the selection. This only works properly if the column names derived for the entity property and the key column match exactly, which might require use of a `@Column` annotation depending on the used NamingStrategy. Closes #1073
Hi, Any news here? Kr, |
How is it going now ? |
The project lead was quite happy with it (that's me). But Mark wasn't satisfied and I failed to convince him or improve the PR. I'll try to revisit it next week. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Whenever an element class of an aggregate has its own field for the ID that is also used as
keyColumn
for the one-to-many relationship to its aggregate root, access to these elements will cause duplicated columns in the generated SQL and consequently warnings like:The problem is described in detail in this StackOverflow question.
Here is a small project repo to demonstrate the problem.
Desired behaviour: No warnings, the column accesses should probably be "squashed".
The text was updated successfully, but these errors were encountered: