DATACMNS-597 - Fixed to strict consistency check in PersistentPropertyAccessor lookup.
BasicpersistentEntity now allows subtypes to be handed into the PersistentPropertyAccessor lookup to support inheritance hierarchies as well as interface based PersistentEntity scenarios.
This commit is contained in:
@@ -372,7 +372,7 @@ public class BasicPersistentEntity<T, P extends PersistentProperty<P>> implement
|
||||
public PersistentPropertyAccessor getPropertyAccessor(Object bean) {
|
||||
|
||||
Assert.notNull(bean, "Target bean must not be null!");
|
||||
Assert.isTrue(getType().equals(bean.getClass()), "Target bean is not of type of the persistent entity!");
|
||||
Assert.isTrue(getType().isInstance(bean), "Target bean is not of type of the persistent entity!");
|
||||
|
||||
return new BeanWrapper<Object>(bean);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user