This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Object Relational Mapping and the fly likes What is wrong with this query? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "What is wrong with this query?" Watch "What is wrong with this query?" New topic
Author

What is wrong with this query?

Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3479

Hi.
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:

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?
Thanks.
Edvins Reisons
Ranch Hand

Joined: Dec 11, 2006
Posts: 364
John,

I believe that the exception messages that you are getting are more specific than "something wrong with this query "
Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3479

IntelliJ tells that the query is not valid, SeamTest throws HibernateException during booting JBoss embedded container.
I don't remember that I got a clear error message from the exception.
Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3479

It seems to me that I haven't define the auth alias...
 
 
subject: What is wrong with this query?