Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Mapping for unidirectional association sample
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="NHTests" namespace="NHTests">
<class name="Order" table="Orders">
<id name="Id">
<generator class="guid" />
<version name="Version" />
<property name="OrderTime" />
<bag name="OrderLines" cascade="all-delete-orphan" >
<key column="OrderId" />
<one-to-many class="OrderLine" />
<class name="OrderLine" table="OrderLines" >
<id name="Id">
<generator class="guid" />
<property name="ProductName" />
<property name="Price" />
<property name="Quantity" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment