-->
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.  [ 1 post ] 
Author Message
 Post subject: Mapping a set as a collection of a subclass JpwH 7.3.2
PostPosted: Tue Dec 23, 2008 8:14 am 
Newbie

Joined: Fri Jun 22, 2007 2:03 pm
Posts: 4
Hi,

we have a problem mapping a set. Imagine we have BillingDetails mapped with a joined-subclass as in JPwH 7.3.2

In the example the user has a set of BillingDetails like this:

Code:
<set name="billingDetails" inverse="true">
  <key column="USER_ID"/>
  <one-to-many class="BillingDetails"/>
</set>


But i want the user to have a set of CreditCards which is a subclass of BillingDetails.

Code:
<set name="creditCards" inverse="true">
  <key column="USER_ID"/>
  <one-to-many class="CreditCards"/>
</set>


This does not work. Hibernate is looking for a column "USER_ID" in the "CREDIT_CARD" table.

Is it possible to inform hibernate in some way that the key column refers to the table of the super class billing details instead of the table of the joined-subclass "CreditCard"?

Your help is very appreciated. Thanks for your attention.

kind regards
Janning


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

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.