Skip to content

Use named selection for projections to avoid AliasCollisionException caused by the same leaf property name#4136

Closed
oualidbouh wants to merge 1 commit intospring-projects:mainfrom
oualidbouh:GH-4135/projection-collision
Closed

Use named selection for projections to avoid AliasCollisionException caused by the same leaf property name#4136
oualidbouh wants to merge 1 commit intospring-projects:mainfrom
oualidbouh:GH-4135/projection-collision

Conversation

@oualidbouh
Copy link

@oualidbouh oualidbouh commented Dec 29, 2025

  • You have read the Spring Data contribution guidelines.
  • You use the code formatters provided here and have them applied to your changes. Don’t submit any formatting related changes.
  • You submit test cases (unit or integration tests) that back your changes.
  • You added yourself as author in the headers of the classes you touched. Amend the date range in the Apache license header if needed. For new types, add the license header (copy from another file and set the current year only).

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Dec 29, 2025
@oualidbouh oualidbouh force-pushed the GH-4135/projection-collision branch 2 times, most recently from c25eb30 to 2305efb Compare December 29, 2025 15:09
Signed-off-by: oualid.bouh <oualid.bouh@kleegroup.com>
@oualidbouh oualidbouh force-pushed the GH-4135/projection-collision branch from 2305efb to 24e70e8 Compare December 29, 2025 15:10
@mp911de mp911de changed the title GH-4135: Interface projection with multiple joins fails with AliasCollisionException in Spring Data JPA 4 / Hibernate 7 Use named selection for projections to avoid AliasCollisionException caused by the same leaf property name Jan 6, 2026
@mp911de mp911de added type: regression A regression from a previous release and removed status: waiting-for-triage An issue we've not yet triaged labels Jan 6, 2026
@mp911de mp911de self-assigned this Jan 6, 2026
mp911de pushed a commit that referenced this pull request Jan 6, 2026
We now use explicitly named selection items when selecting items from a projection selection to avoid name clashes through implicit naming.

Signed-off-by: oualid.bouh <oualid.bouh@kleegroup.com>
Closes #4135
Original pull request: #4136
mp911de added a commit that referenced this pull request Jan 6, 2026
Reformat code.

See #4135
Original pull request: #4136
mp911de pushed a commit that referenced this pull request Jan 6, 2026
We now use explicitly named selection items when selecting items from a projection selection to avoid name clashes through implicit naming.

Signed-off-by: oualid.bouh <oualid.bouh@kleegroup.com>
Closes #4135
Original pull request: #4136
mp911de added a commit that referenced this pull request Jan 6, 2026
Reformat code.

See #4135
Original pull request: #4136
@mp911de
Copy link
Member

mp911de commented Jan 6, 2026

Thank you for your contribution. That's merged, polished, and backported now.

@mp911de mp911de closed this Jan 6, 2026
@mp911de mp911de added this to the 4.0.2 (2025.1.2) milestone Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: regression A regression from a previous release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants