-->
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.  [ 4 posts ] 
Author Message
 Post subject: Mapping an OneToMany ANY mapping
PostPosted: Thu Oct 26, 2006 3:29 pm 
Newbie

Joined: Tue Oct 24, 2006 9:21 pm
Posts: 12
Hi,

I know this is not something normally done in hibernate but can you do a OneToMany mapping for an ANY relationship. We want to do this because we would like a join table for an Entity and all its ancestors:


e.g. on the Join Table we would like the following fields:

entityId, ancestorId, discriminator



so for a given entity, it can have many ancestors.

thanks


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 26, 2006 5:40 pm 
Beginner
Beginner

Joined: Fri Oct 06, 2006 2:49 am
Posts: 25
Hi Dangelo,

I don't know if you work wih annotations or hbm file but this is not yet possible to implement an any relation with annotations. If you are working with annotations, you will have to mix hbm files and annotations

I think you can make it with a oneToAny relation, I did not try it...

good luck,
tiggy


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 31, 2006 4:36 pm 
Newbie

Joined: Tue Oct 24, 2006 9:21 pm
Posts: 12
How do do a oneToAny mapping? Is this supported in hibernate 3?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 31, 2006 5:54 pm 
Newbie

Joined: Tue Oct 31, 2006 5:49 pm
Posts: 1
Location: SFO
i am alos interested ih one-to-many solution, if any body got Luck, please share...
thanks in advance
buchanna gajula


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