[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - What is wrong with this query?

hubaghdadi do-not-reply at jboss.com
Thu Jan 24 05:08:07 EST 2008

I'm using Hibernate as a persistence provider framework and JPA annotations to map domain classes to the database.
I have two classes: 
Author and Book and the relationship is many-to-many.
I defined this names query:
[CODE]@NamedQuery(name = "findAuthorsByBook",
        query = "select auth from Author join auth.books book where book = :book order by auth.lastName")
IntelliJ is telling me that there is something wrong with this query but I'm not convinced to run a SeamTest to try it.
I got a HibernateException (IntelliJ was right after all).
Whats wrong with HQL? 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4122960#4122960

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4122960

More information about the jboss-user mailing list