-->
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.  [ 5 posts ] 
Author Message
 Post subject: One-to-many in table per subclass with discriminator
PostPosted: Sat Sep 03, 2005 6:26 am 
Newbie

Joined: Sun Feb 27, 2005 10:53 pm
Posts: 3
Location: Hong Kong
Hibernate version: 3.0.5

I want to do something like that:
<subclass name="shop.SpecialOrder" discriminator-value="SpecialOrder" lazy="false">
<join table="`SpecialOrder`">
<key>
<column name="`OrderID`"/>
</key>
<list name="Items" lazy="true" cascade="save-update">
<key column="`OrderID`" not-null="false"/>
<index column="`Index`" type="integer"/>
<one-to-many class="shop.OrderLine"/>
</list>
</join>
</subclass>

but list, set...etc is not valid in <join> element, it is possible to put collection in table per subclass strategy with discriminator? It is a bug, limitation or my fault?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 05, 2005 3:03 am 
Newbie

Joined: Sun Feb 27, 2005 10:53 pm
Posts: 3
Location: Hong Kong
I know the problem now.
Put outside join element seems ok.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 06, 2005 5:10 am 
Newbie

Joined: Thu Apr 14, 2005 3:28 am
Posts: 7
Location: Moscow, Russia
ckso wrote:
I know the problem now.
Put outside join element seems ok.


But, in that case foreign key will be generated in the parent class table...
Is it possible a foreign key to be generated in the "join" table?

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 24, 2005 11:43 am 
Newbie

Joined: Wed Oct 19, 2005 3:45 pm
Posts: 14
You could find the solution for the one to many problem inside teh subclass ??

I´,m having the same problem in my porject..

thanks


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 25, 2005 5:16 am 
Newbie

Joined: Thu Apr 14, 2005 3:28 am
Posts: 7
Location: Moscow, Russia
No...
But we use <joined-subclass> mapping and it works perfectly...


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