Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit cc60feb

Browse files
committed
HHH-19706 If property is identifier property, treat it as simple property
1 parent ff89f51 commit cc60feb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎hibernate-core/src/main/java/org/hibernate/metamodel/internal/AttributeFactory.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -727,8 +727,8 @@ private static Member resolveVirtualIdentifierMember( Property property, EntityP
727727

728728
private static Member resolveEntityMember(Property property, EntityPersister declaringEntity) {
729729
final String propertyName = property.getName();
730-
finalAttributeMappingattributeMapping = declaringEntity.findAttributeMapping( propertyName );
731-
returnattributeMapping == null
730+
return !propertyName.equals( declaringEntity.getIdentifierPropertyName() )
731+
&& declaringEntity.findAttributeMapping( propertyName ) == null
732732
// just like in #determineIdentifierJavaMember , this *should* indicate we have an IdClass mapping
733733
? resolveVirtualIdentifierMember( property, declaringEntity )
734734
: getter( declaringEntity, property, propertyName, property.getType().getReturnedClass() );

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /