DATACMNS-695 - Fixed potential NullPointerException in AbstractMappingContext.getPersistentPropertyPath(…).

When traversing nested property paths, AbstractMappingContext.getPersistentPropertyPath(…) previously used the raw actual property type. If the property path contains a reference to a generically typed property, this causes the deeper paths not being resolved correctly.

We now explicitly use the TypeInformation of the property to retain generics information while traversing the path.
This commit is contained in:
Oliver Gierke
2015-05-13 18:33:58 +02:00
parent 9230b5f30f
commit 5b60d487e1
2 changed files with 24 additions and 1 deletions

View File

@@ -239,7 +239,7 @@ public abstract class AbstractMappingContext<E extends MutablePersistentEntity<?
result.add(persistentProperty);
if (iterator.hasNext()) {
current = getPersistentEntity(persistentProperty.getActualType());
current = getPersistentEntity(persistentProperty.getTypeInformation().getActualType());
}
}