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

Fix issue with merge and getReference #1696

Merged
merged 4 commits into from
Jul 5, 2023

Conversation

DavideD
Copy link
Member

@DavideD DavideD commented Jul 5, 2023

Follows #1685
Fix #1504

String uniqueKeyPropertyName = entityType.getRHSUniqueKeyPropertyName();
Object propertyValue = entityPersister.getPropertyValue( value, uniqueKeyPropertyName );
// We now have the value of the property-ref we reference. However,
// we need to dig a little deeper, as that property might also be
// an entity type, in which case we need to resolve its identifier
Type type = entityPersister.getPropertyType( uniqueKeyPropertyName );
final Type type = entityPersister.getPropertyType( uniqueKeyPropertyName );

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation

Invoking [EntityPersister.getPropertyType](1) should be avoided because it has been deprecated.
// We now have the value of the property-ref we reference. However,
// we need to dig a little deeper, as that property might also be
// an entity type, in which case we need to resolve its identifier
final Type type = entityPersister.getPropertyType( uniqueKeyPropertyName );

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation

Invoking [EntityPersister.getPropertyType](1) should be avoided because it has been deprecated.
@DavideD DavideD merged commit 900f1f4 into hibernate:main Jul 5, 2023
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.

Merge with reference fails if entity is associated to a column (non id)
2 participants