DATACMNS-479 - Make sure Map types are not added to the mapping context.
Changed the algorithm for nested PersistentEntity detection to only use PersistentProperty.getPersistentEntityTypes(…) and make sure we return unwrap Maps and Collections inside the method correctly.
This commit is contained in:
@@ -466,10 +466,6 @@ public abstract class AbstractMappingContext<E extends MutablePersistentEntity<?
|
||||
return;
|
||||
}
|
||||
|
||||
if (!property.isEntity()) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (TypeInformation<?> candidate : property.getPersistentEntityType()) {
|
||||
addPersistentEntity(candidate);
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ public abstract class AbstractPersistentProperty<P extends PersistentProperty<P>
|
||||
if (nestedType != null) {
|
||||
result.add(nestedType);
|
||||
}
|
||||
} else {
|
||||
} else if (isEntity()) {
|
||||
result.add(type);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user