-->
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: polymorphic collection example
PostPosted: Mon Jun 07, 2004 10:48 am 
Beginner
Beginner

Joined: Sun Jun 06, 2004 10:13 am
Posts: 20
first, i HAVE read chapter 6 & 8

trying to have a collection of classes that implement the same interface, stored in a parent object (one-many)

possible?

i'm using the table per-class hierachy strategy, which seems logical, and works if i try to persist any of the concreate classes individually.. but if i try to save the parent, with a polymorphic collection, it doesn't work.

here's a snipet from the parent mapping file:

<set name="permissions" cascade="all">
<key column="profileid"/>
<one-to-many class="gov.ProfilePermission"/>
</set>

where ProfilePermsision is an interface.

this seems like a pretty common thing to do, but haven't found an example on the forum here, is this not possible?

thanks

G


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 07, 2004 12:02 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
"Does not work" is not a particulary helpful description.


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.