• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

using session.load with a composite identifier

 
Alberto Dousdebes
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi! i have a table with a composite Id. The mappging is:


The api documentation says:
load(Class theClass, Serializable id)
Return the persistent instance of the given entity class with the given identifier, assuming that the instance exists.

The question is how can i get and object using the load method.???����??? (keep in mind that my object has a composite identifier).

Thanks a lot!!
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to pass an instance of your composite id class with the various properties of the key populated.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic