In these code examples I will use the basic xml configuration.
Relationships in NHibernate are very tightly related to relationships in a SQL database.
One to Many Associations
- One to Many Relationships
<set><one-to-many class="Order"/></set>two tables and an FK CustomerId in Order table
- Many to One Relationship
- Many to many
two tables and an FK CustomerId in Order table
<many-to-many/>** joining table with two FKs, one to each related table
1 2 3 4 5 6 7 8 9 10 11 12
One to One Association
Relationship where two tables share the same
- NHibernate Fundamentals at Pluralsight