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.  [ 3 posts ] 
Author Message
 Post subject: joined-subclass with composite-id: is it possible?
PostPosted: Thu Aug 17, 2006 9:39 am 
Senior
Senior

Joined: Fri Jan 13, 2006 2:50 pm
Posts: 123
Location: Blumenau / SC / Brasil
Hi.

Is it possible tu use a joined-subclass with composite-id?

For example:

Code:
<joined-subclass name="Cliente" extends="Pessoa" table="cliente" lazy="true">                   
    <key column="PES_ID" />
...



My table "Pessoa" has another pk field, this is EmpId. How can I add this to the map?

Thanks..


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 18, 2006 9:48 am 
Senior
Senior

Joined: Fri Jan 13, 2006 2:50 pm
Posts: 123
Location: Blumenau / SC / Brasil
Please!

I need to map inheritance, but my classes use composite-id! :(

Tks


Top
 Profile  
 
 Post subject: map both keys
PostPosted: Fri Dec 15, 2006 4:14 pm 
Newbie

Joined: Wed Dec 21, 2005 6:05 pm
Posts: 5
Location: Washington DC
You've probably figured this out already, but it might help someone else.

Code:
<joined-subclass name="Cliente" extends="Pessoa" table="cliente" lazy="true">
  <key>
   <column name="PES_ID"/>
    <column name="EmpId"/>
  </key>


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.