Click here to Skip to main content
15,892,809 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
For an example, if i have:
Table1(CustomerID, CompanyName, ContactName)
Table2(CustomerID, CustomerName)

in NHibernate: How do i get List<table1> include:
CustomerID, CustomerName, CompanyName, ContactName ?
Posted
Updated 15-Jun-10 20:07pm
v2

Have a look at this article:NHibernate Made Simple[^]
This should help you out.
 
Share this answer
 
Comments
thuyphuongid 16-Jun-10 2:40am    
Thank a lot.
in the hibernate mapping file add following:

XML
<join table="Orders">
      <key column="CustomerID"/>
      <property name="CompanyName" update="false" insert="false"/>
    </join>
 
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