-->
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: Inheritance and Sets
PostPosted: Wed Oct 18, 2006 1:44 am 
Newbie

Joined: Thu Feb 02, 2006 7:09 pm
Posts: 8
Hello,

I'm trying to take advantage of the inheritance features of Hibernate, but it doesn't look like sets in subclasses are supported? See the following example:

<hibernate-mapping>
..<class name="Payment" table="competition" catalog="clevertv">
....<cache usage="read-write"/>
....<id name="paymentId" type="java.lang.Integer">
......<column name="paymentID" />
......<generator class="native" />
....</id>
....<discriminator column="paymentType" type="string"/>
....<subclass name="CreditCardPayment" discriminator-value="cc">
......<join table="credit_card_payment">
........<key column="paymentId"/>
........<property name="cvv2" type="java.lang.String">
..........<column name="ccv2" not-null="true" />
........</property>
........<set name="cardTypes" inverse="true">
..........<key>
............<column name="paymentID" not-null="true" />
..........</key>
..........<one-to-many class="CardType" />
........</set>
......</join>
....</subclass>
..</class>
</hibernate-mapping>

In this example, the 'cvv2' property in CreditCardPayment is just fine, however the xml schema doesn't allow me to specify the set 'cardTypes' which we want to be available in CreditCardPayment and not Payment.

Is this intentional or am I missing something?

Thanks for your help,

George


Top
 Profile  
 
 Post subject: Ignore This Post!
PostPosted: Wed Oct 18, 2006 2:03 am 
Newbie

Joined: Thu Feb 02, 2006 7:09 pm
Posts: 8
Ok, I was was being stupid! I just have to sepcify the Set element before the Join element.

Sorry!

George


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.