Java Mailing List Archive

http://www.gg3721.com/

Home » Hibernate Commits List »

[hibernate-commits] Hibernate SVN: r15042 -
 core/trunk/core/src/main/java/org/hibernate/event/def.

hibernate-commits

2008-08-12


Author LoginPost Reply
Author: d.plentz
Date: 2008-08-12 13:21:04 -0400 (Tue, 12 Aug 2008)
New Revision: 15042

Modified:
 core/trunk/core/src/main/java/org/hibernate/event/def/DefaultLoadEventListener.java
Log:
[HHH-3247] Provide more information in TypeMismatchException message

Modified: core/trunk/core/src/main/java/org/hibernate/event/def/DefaultLoadEventListener.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/event/def/DefaultLoadEventListener.java  2008-08-12 17:06:53 UTC (rev 15041)
+++ core/trunk/core/src/main/java/org/hibernate/event/def/DefaultLoadEventListener.java  2008-08-12 17:21:04 UTC (rev 15042)
@@(protected) @@
     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()
       );
     }
   }

_______________________________________________
hibernate-commits mailing list
hibernate-commits@(protected)
https://lists.jboss.org/mailman/listinfo/hibernate-commits
©2008 gg3721.com - Jax Systems, LLC, U.S.A.