[HHH-3247] Provide more information in TypeMismatchException message
git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@15042 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
parent
d6ea776b85
commit
d5e908eaeb
|
@ -107,7 +107,7 @@ public class DefaultLoadEventListener extends AbstractLockUpgradeEventListener i
|
|||
Class idClass = persister.getIdentifierType().getReturnedClass();
|
||||
if ( idClass != null && ! idClass.isInstance( event.getEntityId() ) ) {
|
||||
throw new TypeMismatchException(
|
||||
"Provided id of the wrong type. Expected: " + idClass + ", got " + event.getEntityId().getClass()
|
||||
"Provided id of the wrong type for class " + persister.getEntityName() + ". Expected: " + idClass + ", got " + event.getEntityId().getClass()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue