-->
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.  [ 3 posts ] 
Author Message
 Post subject: Can someone show me how i can map these Situation
PostPosted: Mon Feb 13, 2006 1:04 pm 
Newbie

Joined: Mon Feb 06, 2006 10:22 am
Posts: 3
Location: Ireland
Please can someone show me how to map these relationship. i tried out but i wasnt getting the results i expected

Code:
class Teacher {
Long id;
String name;
List<Students> students;
}

class Students {
Long id;
String name;
List<Teacher> teachers;
}



Thanks


Hibernate version: 3.1

Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using:

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:

[/code]

_________________
Life is a Risk, Take it or you are not living


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 13, 2006 2:19 pm 
Regular
Regular

Joined: Wed Feb 08, 2006 3:59 pm
Posts: 75
There's an example applying to you problem in the reference doc : http://www.hibernate.org/hib_docs/v3/reference/en/html/associations.html#assoc-bidirectional-join-m2m


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 14, 2006 4:52 am 
Newbie

Joined: Mon Feb 06, 2006 10:22 am
Posts: 3
Location: Ireland
yeah just perfect...thanks

_________________
Life is a Risk, Take it or you are not living


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