-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Loading objects with composite keys
PostPosted: Tue Jan 06, 2004 12:15 pm 
Newbie

Joined: Mon Dec 08, 2003 2:21 pm
Posts: 10
I have a persistent object with composite key. The composite key is not mapped with a Java class, instead, it is mapped as follows:

<composite-id>
<key-property
name="P1"
column="OPERATION_ABBR"
type="java.lang.String"
length="255"
/>
<key-property
name="roleAbbr"
column="ROLE_ABBR"
type="java.lang.String"
length="255"
/>
</composite-id>


How can I use session.load or session.get to retrieve this object from the persistence store using the composite key?

(btw, I knew how it can loaded if it is mapped with a Java class: <composite-id class="CompPk">... )

Any help is greatly appreciated.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 06, 2004 12:51 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Can't
Use find()

_________________
Emmanuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.