-->
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: Two bidirectional associations between two classes
PostPosted: Tue Aug 26, 2008 12:39 am 
Newbie

Joined: Sat Dec 18, 2004 7:29 pm
Posts: 4
I am not sure exactly how to think about this. Could someone give me an example of how to map this relationship or point me to the correct post.

I have attempted to work this a few different ways but I always get stuck trying to make it bi-directional.

Hibernate version:

Hibernate 3.2.6.ga
Hibernate Annotations 3.3.0.ga

Code:
public class Father {

    public Son firstBornSon;
    public Son secondBornSon;

    public Son getFirstBornSon()
    public Son getSecondBornSon()
}

public class Son {

    public Father father;

    public getFather()
}


Thank you.[/quote]


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.