HHH-12634 Make EntityPrinter more permissive regarding the parameters passed

This commit is contained in:
Guillaume Smet 2018-05-25 15:21:01 +02:00 committed by Chris Cranford
parent 9d4d0ae63b
commit 38552103cc
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ public final class EntityPrinter {
public String toString(String entityName, Object entity) throws HibernateException {
EntityPersister entityPersister = factory.getEntityPersister( entityName );
if ( entityPersister == null ) {
if ( entityPersister == null || !entityPersister.isInstance( entity ) ) {
return entity.getClass().getName();
}