mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-10 21:24:49 +00:00
Fix issue with EmbeddableMappingType creation
This commit is contained in:
parent
7fc2593515
commit
f6f1cb06d4
@ -109,13 +109,18 @@ public StandardPojoEntityRepresentationStrategy(
|
||||
final KeyValue bootDescriptorIdentifier = bootDescriptor.getIdentifier();
|
||||
|
||||
if ( bootDescriptorIdentifier instanceof Component ) {
|
||||
final Component component = (Component) bootDescriptorIdentifier;
|
||||
if ( bootDescriptor.getIdentifierMapper() != null ) {
|
||||
mapsIdRepresentationStrategy = new StandardPojoEmbeddableRepresentationStrategy(
|
||||
bootDescriptor.getIdentifierMapper(),
|
||||
creationContext
|
||||
);
|
||||
}
|
||||
else if ( bootDescriptorIdentifier != null ) {
|
||||
mapsIdRepresentationStrategy = new StandardPojoEmbeddableRepresentationStrategy(
|
||||
(Component) bootDescriptorIdentifier,
|
||||
creationContext
|
||||
);
|
||||
}
|
||||
else {
|
||||
mapsIdRepresentationStrategy = null;
|
||||
}
|
||||
|
@ -171,17 +171,11 @@ public static CompositeIdentifierMapping buildNonEncapsulatedCompositeIdentifier
|
||||
propertyAccess
|
||||
);
|
||||
Component bootComponentDescriptor = bootEntityDescriptor.getIdentifierMapper();
|
||||
final List<SingularAttributeMapping> idAttributeMappings;
|
||||
final Iterator<Property> bootIdSubPropertyItr;
|
||||
if ( bootComponentDescriptor == null ) {
|
||||
idAttributeMappings = new ArrayList<>( bootIdClassComponent.getPropertySpan() );
|
||||
bootIdSubPropertyItr = bootIdClassComponent.getPropertyIterator();
|
||||
|
||||
}
|
||||
else {
|
||||
idAttributeMappings = new ArrayList<>( bootComponentDescriptor.getPropertySpan() );
|
||||
bootIdSubPropertyItr = bootComponentDescriptor.getPropertyIterator();
|
||||
bootComponentDescriptor = bootIdClassComponent;
|
||||
}
|
||||
final List<SingularAttributeMapping> idAttributeMappings = new ArrayList<>( bootComponentDescriptor.getPropertySpan() );
|
||||
final Iterator<Property> bootIdSubPropertyItr = bootComponentDescriptor.getPropertyIterator();
|
||||
|
||||
int columnsConsumedSoFar = 0;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user