-->
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: one-to-many -> Reverse keys...
PostPosted: Fri Oct 20, 2006 4:54 am 
Newbie

Joined: Fri Oct 20, 2006 4:35 am
Posts: 1
Location: Denmark
Hibernate version:
1.2.0 beta 1

Name and version of the database you are using:
MSSQL 2005

Hi!
Im new at NHibernate to say the least - but i did read a whole lot of documentation. I may be blind but i really cant seem to find what im looking for:

Its a one-to-many relation, but with the foreign-key placed in the parent-table. How does the XML-mapping look for this?

This is my DB-design (simplified):

TField (Parent)
ID {Guid, Identifier, non-null}
Version {Integer, Identifier, non-null}
NameID {Foreign-Key, non-null}

TName (Child)
ID {Guid, Identifier, non-null}
Version {Integer, Identifier, non-null}
Value{varchar(100), non-null}

That is, one TFIeld may reference one or more TName's (each with different version)

The TField C#-class would have a list of TName's, and the TName-class a single property to TField.


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.