Fix issue with EmbeddableMappingType creation
This commit is contained in:
parent
7fc2593515
commit
f6f1cb06d4
|
@ -109,13 +109,18 @@ public class StandardPojoEntityRepresentationStrategy implements EntityRepresent
|
|||
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 class MappingModelCreationHelper {
|
|||
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…
Reference in New Issue