Skip to content
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

Use IdentifiableType.hasSingleIdAttribute() to detect IdClass presence to obtain IdClass attributes #2412

Closed
wants to merge 2 commits into from

Conversation

mp911de
Copy link
Member

@mp911de mp911de commented Jan 18, 2022

We now use IdentifiableType.hasSingleIdAttribute() to detect whether a type should have an IdClass. hasSingleIdAttribute is defined to return false if an IdClass is being used. It could also return false in case multiple identifier attributes are in place (composite Id) which is a bit of a grey area. At least we avoid using Hibernate-specific API.

See #2330
Closes #2391


We should backport and forward port this to 2.5.x and main

…e to obtain IdClass attributes.

We now use IdentifiableType.hasSingleIdAttribute() to detect whether a type should have an IdClass. hasSingleIdAttribute is defined to return false if an IdClass is being used. It could also return false in case multiple identifier attributes are in place (composite Id) which is a bit of a grey area. At least we avoid using Hibernate-specific API.
@mp911de mp911de added the type: task A general task label Jan 18, 2022
schauder pushed a commit that referenced this pull request Jan 21, 2022
…e to obtain IdClass attributes.

We now use IdentifiableType.hasSingleIdAttribute() to detect whether a type should have an IdClass. hasSingleIdAttribute is defined to return false if an IdClass is being used. It could also return false in case multiple identifier attributes are in place (composite Id) which is a bit of a grey area. At least we avoid using Hibernate-specific API.

Original pull request #2412
See #2330
Closes #2391
schauder pushed a commit that referenced this pull request Jan 21, 2022
…e to obtain IdClass attributes.

We now use IdentifiableType.hasSingleIdAttribute() to detect whether a type should have an IdClass. hasSingleIdAttribute is defined to return false if an IdClass is being used. It could also return false in case multiple identifier attributes are in place (composite Id) which is a bit of a grey area. At least we avoid using Hibernate-specific API.

Original pull request #2412
See #2330
Closes #2391
schauder pushed a commit that referenced this pull request Jan 21, 2022
…e to obtain IdClass attributes.

We now use IdentifiableType.hasSingleIdAttribute() to detect whether a type should have an IdClass. hasSingleIdAttribute is defined to return false if an IdClass is being used. It could also return false in case multiple identifier attributes are in place (composite Id) which is a bit of a grey area. At least we avoid using Hibernate-specific API.

Original pull request #2412
See #2330
Closes #2391
@schauder
Copy link
Contributor

That's merged and ported in all directions.

@schauder schauder closed this Jan 21, 2022
@AndreasALoew
Copy link

Thanks a million! 👍

@schauder schauder deleted the issue/2391 branch March 1, 2022 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: task A general task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix for #2330 causes Spring Data JPA to no longer run on any Hibernate version before 5.4
3 participants