HHH-13054 handle referencedColumnName to entities with multiple @Id properties
This commit is contained in:
parent
1f4c8f7b19
commit
b6792bdb19
|
@ -430,7 +430,16 @@ public class BinderHelper {
|
|||
for ( Property property : persistentClass.getProperties() ) {
|
||||
matchColumnsByProperty( property, columnsToProperty );
|
||||
}
|
||||
matchColumnsByProperty( persistentClass.getIdentifierProperty(), columnsToProperty );
|
||||
if ( persistentClass.hasIdentifierProperty() ) {
|
||||
matchColumnsByProperty( persistentClass.getIdentifierProperty(), columnsToProperty );
|
||||
}
|
||||
else {
|
||||
// special case for entities with multiple @Id properties
|
||||
Component key = persistentClass.getIdentifierMapper();
|
||||
for ( Property p : key.getProperties() ) {
|
||||
matchColumnsByProperty( p, columnsToProperty );
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
for ( Property property : ((Join) columnOwner).getProperties() ) {
|
||||
|
|
|
@ -52,7 +52,8 @@ public class EntityTypeImpl<J>
|
|||
persistentClass.getEntityName(),
|
||||
javaType,
|
||||
superType,
|
||||
persistentClass.getDeclaredIdentifierMapper() != null || ( superType != null && superType.hasIdClass() ),
|
||||
persistentClass.getDeclaredIdentifierMapper() != null
|
||||
|| superType != null && superType.hasIdClass(),
|
||||
persistentClass.hasIdentifierProperty(),
|
||||
persistentClass.isVersioned(),
|
||||
jpaMetamodel
|
||||
|
|
Loading…
Reference in New Issue