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:
Oliver Gierke
2014-03-27 11:56:17 +01:00
parent f33f57b887
commit fa41724bfe
3 changed files with 30 additions and 6 deletions

View File

@@ -466,10 +466,6 @@ public abstract class AbstractMappingContext<E extends MutablePersistentEntity<?
return;
}
if (!property.isEntity()) {
return;
}
for (TypeInformation<?> candidate : property.getPersistentEntityType()) {
addPersistentEntity(candidate);
}

View File

@@ -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);
}