HHH-12634 Make EntityPrinter more permissive regarding the parameters passed
This commit is contained in:
parent
9d4d0ae63b
commit
38552103cc
|
@ -40,7 +40,7 @@ public final class EntityPrinter {
|
||||||
public String toString(String entityName, Object entity) throws HibernateException {
|
public String toString(String entityName, Object entity) throws HibernateException {
|
||||||
EntityPersister entityPersister = factory.getEntityPersister( entityName );
|
EntityPersister entityPersister = factory.getEntityPersister( entityName );
|
||||||
|
|
||||||
if ( entityPersister == null ) {
|
if ( entityPersister == null || !entityPersister.isInstance( entity ) ) {
|
||||||
return entity.getClass().getName();
|
return entity.getClass().getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue