Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

78 lines (77 sloc) 2.72 kb
<?xml version="1.0"?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" default-lazy="false">
<class name="NHibernate.DomainModel.Master, NHibernate.DomainModel">
<meta attribute="foo">foo</meta>
<id column="master_key_column" type="Int64">
<generator class="native"/>
</id>
<!--TODO: make sure this type has an equiv .net type-->
<version name="version" type="Timestamp" column="ts_" access="field" unsaved-value="1/1/0001"/>
<property name="Name">
<meta attribute="bar">bar</meta>
<meta attribute="bar">bar2</meta>
</property>
<property name="X"/>
<!--
length="5"
<column name="big_dec" sql-type="DECIMAL(5,3)"/>
-->
<!--
TODO: Find .net equiv
<property
name="BigDecimal"
type="Decimal(5,3)"
column="big_dec"
/>
-->
<set name="Details" inverse="true" lazy="true" order-by="i asc">
<key column="master_key"/>
<one-to-many class="NHibernate.DomainModel.Detail, NHibernate.DomainModel"/>
</set>
<set name="MoreDetails" cascade="all" lazy="true" order-by="i desc">
<key column="more_master_key"/>
<one-to-many class="NHibernate.DomainModel.Detail, NHibernate.DomainModel"/>
</set>
<set name="Incoming" lazy="true" table="mtm">
<key foreign-key="AA" column="outgoingabcdef"/>
<many-to-many class="NHibernate.DomainModel.Master, NHibernate.DomainModel" foreign-key="BB">
<column name="incomingabcdef" index="IBB"/>
</many-to-many>
</set>
<set name="Outgoing" lazy="true" table="mtm" inverse="true">
<key column="incomingabcdef"/>
<many-to-many class="NHibernate.DomainModel.Master, NHibernate.DomainModel" column="outgoingabcdef"/>
</set>
<many-to-one name="OtherMaster"/>
</class>
<class name="NHibernate.DomainModel.Detail, NHibernate.DomainModel">
<id column="detail_key" type="Int64" unsaved-value="0">
<generator class="native"/>
</id>
<property name="X">
<column name="x" unique-key="uk" not-null="true"/>
</property>
<property name="I">
<column name="i" unique-key="uk" not-null="true"/>
</property>
<many-to-one name="Master" foreign-key="CC">
<column name="master_key" unique-key="uk" not-null="true"/>
</many-to-one>
<set name="SubDetails" lazy="true" cascade="all">
<key column="detail_key"/>
<one-to-many class="NHibernate.DomainModel.SubDetail, NHibernate.DomainModel"/>
</set>
</class>
<class name="NHibernate.DomainModel.SubDetail, NHibernate.DomainModel">
<id column="subdetail_key" type="Int64">
<generator class="native">
<param name="sequence">fooseq</param>
</generator>
</id>
<property name="Name"/>
</class>
<query name="all_details"><![CDATA[
from d in class
NHibernate.DomainModel.Detail
]]></query>
</hibernate-mapping>
Jump to Line
Something went wrong with that request. Please try again.