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: Mapping One to Many /Many to One
PostPosted: Thu Sep 06, 2007 8:52 am 
Newbie

Joined: Wed Jul 04, 2007 9:28 am
Posts: 9
Hi the situation is as follows:

I have an Employee table, a SellerCity Table and a City Table.
What I want is An Employee Object with the Cities assigned to its seller.

the tables look like this:

EMPLOYEE
EmpID:1
Name:John Doe

Sellercity:
ScID:1
EmpID:1
CITYID:5
---------
ScID:2
EmpID:1
CITYID:10

CITY:
CITYID: 5
NAME: New York
---------------------
CITYID: 10
NAME: Seattle

How can i declare such a mapping?

thanks in advance
AS


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 10, 2007 3:59 pm 
Expert
Expert

Joined: Fri May 13, 2005 11:13 am
Posts: 292
Location: Rochester, NY
This is a very basic many-to-many collection (http://www.hibernate.org/hib_docs/nhibernate/1.2/reference/en/html/collections.html#collections-ofvalues). Please read the manual.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 18, 2007 4:28 am 
Newbie

Joined: Wed Jul 04, 2007 9:28 am
Posts: 9
thanks a lot


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.