HHH-12539 - NPE in AbstractPropertyMapping.getCommonPersistentClass when creating UnionSubclassEntityPersister for dynamic-map
This commit is contained in:
parent
118e7dc1f2
commit
fdb31045b9
|
@ -269,7 +269,8 @@ public abstract class AbstractPropertyMapping implements PropertyMapping {
|
||||||
}
|
}
|
||||||
|
|
||||||
private PersistentClass getCommonPersistentClass(PersistentClass clazz1, PersistentClass clazz2) {
|
private PersistentClass getCommonPersistentClass(PersistentClass clazz1, PersistentClass clazz2) {
|
||||||
while ( clazz2 != null && !clazz2.getMappedClass().isAssignableFrom( clazz1.getMappedClass() ) ) {
|
while ( clazz2 != null && clazz2.getMappedClass() != null && clazz1.getMappedClass() != null && !clazz2.getMappedClass()
|
||||||
|
.isAssignableFrom( clazz1.getMappedClass() ) ) {
|
||||||
clazz2 = clazz2.getSuperclass();
|
clazz2 = clazz2.getSuperclass();
|
||||||
}
|
}
|
||||||
return clazz2;
|
return clazz2;
|
||||||
|
|
Loading…
Reference in New Issue