[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:
Diego Plentz 2008-08-12 17:21:04 +00:00
parent d6ea776b85
commit d5e908eaeb
1 changed files with 1 additions and 1 deletions

View File

@ -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()
);
}
}