HHH-15354 Throw MappingException instead of NPE for hbm referencing unmapped class
This commit is contained in:
parent
48e3bf8381
commit
a8318fdfb9
|
@ -165,6 +165,9 @@ public abstract class ToOne extends SimpleValue implements Fetchable, SortableVa
|
|||
@Override
|
||||
public int[] sortProperties() {
|
||||
final PersistentClass entityBinding = getMetadata().getEntityBinding( getReferencedEntityName() );
|
||||
if ( entityBinding == null ) {
|
||||
return null;
|
||||
}
|
||||
final Value value;
|
||||
if ( getReferencedPropertyName() == null ) {
|
||||
value = entityBinding.getIdentifier();
|
||||
|
|
Loading…
Reference in New Issue