Skip to content

Avoid duplicate selection of columns. #1074

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

Closed
wants to merge 3 commits into from

Conversation

schauder
Copy link
Contributor

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

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
Code formatting.

See #1073
schauder added a commit that referenced this pull request Aug 10, 2022
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
Original pull request #1074
schauder added a commit that referenced this pull request Aug 10, 2022
Code formatting.

See #1073
Original pull request #1074
@schauder
Copy link
Contributor Author

I applied the review feedback and merged this.

@schauder schauder closed this Aug 10, 2022
@schauder schauder deleted the issue/1073-duplicate-select branch August 10, 2022 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

One-to-many relation: ResultSet contains ... multiple times
2 participants