-
-
Save stanb/9a6d4668e2af0fff37da to your computer and use it in GitHub Desktop.
Mapping for unidirectional association sample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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" /> | |
</id> | |
<version name="Version" /> | |
<property name="OrderTime" /> | |
<bag name="OrderLines" cascade="all-delete-orphan" > | |
<key column="OrderId" /> | |
<one-to-many class="OrderLine" /> | |
</bag> | |
</class> | |
<class name="OrderLine" table="OrderLines" > | |
<id name="Id"> | |
<generator class="guid" /> | |
</id> | |
<property name="ProductName" /> | |
<property name="Price" /> | |
<property name="Quantity" /> | |
</class> | |
</hibernate-mapping> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment