Click here to Skip to main content
15,889,839 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi I am new to the nhibernate world. I have a scenario where my many to many relationship table has more than just the primary keys. I have one relationship table that defines all my relationship with the type id, to identify the type of relationship and the date when the relationship was created. Structure will be, parentId, ChildId, RelationShipTypeId, UpdateDateTime and UpdateUserId

Ex. Order, Invoice, Orderdetails,Customer and ProductRelationship. ProductRlationship table has parentid, childid,RelationshipTypeid. Order will have a relationship with other tables using different typeid's.

How do I use nhib to QUERY AND UPDATE this model.

Thanks in advance for your help.
Posted
Updated 3-Jul-10 1:55am
v2

1 solution

You can use NHibernate to define this relationship, but I cannot remember how! The Intermediate Table is called a Cross-Ref (or XRef) table, but normally this does not contain the relationship date.

Your best bet is to post on the NHibernate forum as this specialises in NHibernate :-).
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900