File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes issue in HQL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "issue in HQL" Watch "issue in HQL" New topic
Author

issue in HQL

Amitosh Mishra
Ranch Hand

Joined: Feb 11, 2010
Posts: 49
Hi all,

i am very new Hibernate.

please help me to understand the issue..
query


but iam getting exception


object classes are
CLS.java


CCLS.java


regards
Amitosh
Jelle Klap
Bartender

Joined: Mar 10, 2008
Posts: 1753
    
    7

The composite key mapping in the CLS class is wonky.
Have a look at the Hibernate reference material on the subject.


Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.
Amitosh Mishra
Ranch Hand

Joined: Feb 11, 2010
Posts: 49
Thanks Jelle Klap,

i am to resolve the issue .
can you suggest me how can i use criteria for such queries

query i am trying to process is


regrads
Amitosh
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1648
    
    7

Take a look at the link Jelle provided.

You cannot have multiple @Id annotations on one @Entity without an @IdClass defined. Alternatively you can define an @EmbeddedId


[How To Ask Questions][Read before you PM me]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: issue in HQL
 
Similar Threads
org.hibernate.QueryException: could not resolve property: ObjectId of: test.Objtablee
simple question
Basic Hibernate many-to-many mapping / query not right
Hibernate incorrect replacement of Class in Named Query
Hibernate/Spring/Jboss Annotations + Entity Mapping problems