[hibernate-commits] Hibernate SVN: r12782 - trunk/HibernateExt/search/src/java/org/hibernate/search/query.

hibernate-commits at lists.jboss.org hibernate-commits at lists.jboss.org
Thu Jul 19 23:14:26 EDT 2007


Author: epbernard
Date: 2007-07-19 23:14:26 -0400 (Thu, 19 Jul 2007)
New Revision: 12782

Modified:
   trunk/HibernateExt/search/src/java/org/hibernate/search/query/FullTextQueryImpl.java
Log:
better exception message on unmapped class

Modified: trunk/HibernateExt/search/src/java/org/hibernate/search/query/FullTextQueryImpl.java
===================================================================
--- trunk/HibernateExt/search/src/java/org/hibernate/search/query/FullTextQueryImpl.java	2007-07-19 22:28:14 UTC (rev 12781)
+++ trunk/HibernateExt/search/src/java/org/hibernate/search/query/FullTextQueryImpl.java	2007-07-20 03:14:26 UTC (rev 12782)
@@ -320,7 +320,7 @@
 			for ( Class clazz : involvedClasses ) {
 				DocumentBuilder builder = builders.get( clazz );
 				//TODO should we rather choose a polymorphic path and allow non mapped entities
-				if ( builder == null ) throw new HibernateException( "Not a mapped entity: " + clazz );
+				if ( builder == null ) throw new HibernateException( "Not a mapped entity (don't forget to add @Indexed): " + clazz );
 				final DirectoryProvider directoryProvider = builder.getDirectoryProvider();
 				if ( ! directories.contains( directoryProvider ) ) {
 					directories.add( directoryProvider );




More information about the hibernate-commits mailing list