This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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

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

but iam getting exception

object classes are

Jelle Klap

Joined: Mar 10, 2008
Posts: 1924

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

Bill Gorder

Joined: Mar 07, 2010
Posts: 1682

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:
subject: issue in HQL
It's not a secret anymore!