To use associations your table should contain a foreign key. In your current table definition you should use component, and the mapping like this:
<class name="Product" table="Product"> <id name="ProductID" column="ProductID"> <generator class="hilo"/> </id> <property name="Name"/> <property name="Price"/> <component name="ProductDetail" class="ProductDetail"> <parent name="Product" /> <property name="CreateTime"/> <property name="LastUpdated"/> </component> </class> Remove ProductID property from ProductDetail class In my opinion <generator class="hilo"/> and [ProductID] [int] IDENTITY (1,1) NOT NULL is somewhat inconsistent. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to nhusers@googlegroups.com To unsubscribe from this group, send email to nhusers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---