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();
|
final KeyValue bootDescriptorIdentifier = bootDescriptor.getIdentifier();
|
||||||
|
|
||||||
if ( bootDescriptorIdentifier instanceof Component ) {
|
if ( bootDescriptorIdentifier instanceof Component ) {
|
||||||
final Component component = (Component) bootDescriptorIdentifier;
|
|
||||||
if ( bootDescriptor.getIdentifierMapper() != null ) {
|
if ( bootDescriptor.getIdentifierMapper() != null ) {
|
||||||
mapsIdRepresentationStrategy = new StandardPojoEmbeddableRepresentationStrategy(
|
mapsIdRepresentationStrategy = new StandardPojoEmbeddableRepresentationStrategy(
|
||||||
bootDescriptor.getIdentifierMapper(),
|
bootDescriptor.getIdentifierMapper(),
|
||||||
creationContext
|
creationContext
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
else if ( bootDescriptorIdentifier != null ) {
|
||||||
|
mapsIdRepresentationStrategy = new StandardPojoEmbeddableRepresentationStrategy(
|
||||||
|
(Component) bootDescriptorIdentifier,
|
||||||
|
creationContext
|
||||||
|
);
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
mapsIdRepresentationStrategy = null;
|
mapsIdRepresentationStrategy = null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -171,17 +171,11 @@ public class MappingModelCreationHelper {
|
||||||
propertyAccess
|
propertyAccess
|
||||||
);
|
);
|
||||||
Component bootComponentDescriptor = bootEntityDescriptor.getIdentifierMapper();
|
Component bootComponentDescriptor = bootEntityDescriptor.getIdentifierMapper();
|
||||||
final List<SingularAttributeMapping> idAttributeMappings;
|
|
||||||
final Iterator<Property> bootIdSubPropertyItr;
|
|
||||||
if ( bootComponentDescriptor == null ) {
|
if ( bootComponentDescriptor == null ) {
|
||||||
idAttributeMappings = new ArrayList<>( bootIdClassComponent.getPropertySpan() );
|
bootComponentDescriptor = bootIdClassComponent;
|
||||||
bootIdSubPropertyItr = bootIdClassComponent.getPropertyIterator();
|
|
||||||
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
idAttributeMappings = new ArrayList<>( bootComponentDescriptor.getPropertySpan() );
|
|
||||||
bootIdSubPropertyItr = bootComponentDescriptor.getPropertyIterator();
|
|
||||||
}
|
}
|
||||||
|
final List<SingularAttributeMapping> idAttributeMappings = new ArrayList<>( bootComponentDescriptor.getPropertySpan() );
|
||||||
|
final Iterator<Property> bootIdSubPropertyItr = bootComponentDescriptor.getPropertyIterator();
|
||||||
|
|
||||||
int columnsConsumedSoFar = 0;
|
int columnsConsumedSoFar = 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue