I have added Hibernate3.jar in my classpath and above problem is solved but now it gives following exception
Please help
Thanks
Deepika Joshi
Ranch Hand
Joined: Feb 24, 2009
Posts: 268
posted
0
You need to have class with composit key fields , implementation of equals & hashcode method
And using that class as composit key with entity with @IdClass annotation.
@IdClass annotation is misssing with your entity.
Marcos Serrano
Ranch Hand
Joined: Jul 13, 2006
Posts: 45
posted
0
You need a composite key...try creating a class with your 2 key fields (id and name) and implement that class into your entity.
toutes les jours
Eswar Kaligotla
Greenhorn
Joined: Oct 15, 2007
Posts: 3
posted
0
This can be achieved by using either IdClass or Embeddable/EmbeddedId. Both are more or less same.
Let us all know what hapened after using IdClass or Embeddable.
subject: Problem in persisting Entity with Composite Key