[hibernate-commits] Hibernate SVN: r10542 - trunk/HibernateExt/metadata/src/java/org/hibernate/cfg
hibernate-commits at lists.jboss.org
hibernate-commits at lists.jboss.org
Mon Oct 2 20:19:07 EDT 2006
Author: epbernard
Date: 2006-10-02 20:19:06 -0400 (Mon, 02 Oct 2006)
New Revision: 10542
Modified:
trunk/HibernateExt/metadata/src/java/org/hibernate/cfg/AnnotationBinder.java
Log:
better exception message
Modified: trunk/HibernateExt/metadata/src/java/org/hibernate/cfg/AnnotationBinder.java
===================================================================
--- trunk/HibernateExt/metadata/src/java/org/hibernate/cfg/AnnotationBinder.java 2006-10-02 18:27:05 UTC (rev 10541)
+++ trunk/HibernateExt/metadata/src/java/org/hibernate/cfg/AnnotationBinder.java 2006-10-03 00:19:06 UTC (rev 10542)
@@ -942,8 +942,10 @@
List<XProperty> properties = annotatedClass.getDeclaredProperties( accessType );
for ( XProperty p : properties ) {
if ( !p.isTypeResolved() && !discoverTypeWithoutReflection( p ) && !mustBeSkipped( p, mappings ) ) {
- throw new IllegalStateException(
- "Property " + p + " has an unbound type and no explicit target entity."
+ throw new AnnotationException(
+ "Property " + StringHelper.qualify( propertyHolder.getEntityName(), p.getName() ) +
+ " has an unbound type and no explicit target entity. Resolve this Generic usage issue" +
+ " or set an explicit target attribute (eg @OneToMany(target=) or use an explicit @Type"
);
}
final boolean currentHasIdentifier = addProperty( p, elements, localPropertyAccessor, mappings );
More information about the hibernate-commits
mailing list