views:

323

answers:

0

Sorry, didn't paste correctly in initial posting...

Here is mapping file that ActiveRecord generates:

<?xml version="1.0" encoding="utf-16"?> 
    <hibernate-mapping  auto-import="true" default-lazy="false" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:nhibernate-mapping-2.2"> 
      <class name="FieldResult, Data" table="FieldResults"> 
        <id name="ID" access="property" column="ID" type="Int32" unsaved-value="0"> 
          <generator class="native"> 
            <param name="sequence">FieldResults_ID</param> 
          </generator> 
        </id> 
        <property name="FieldID" access="property" type="String"> 
          <column name="Field_ID"/> 
        </property> 
        <property name="Name" access="property" type="String"> 
          <column name="Name"/> 
        </property> 
        <property name="DisplayValue" access="property" type="String"> 
          <column name="Value"/> 
        </property> 
        <property name="MessagePosition" access="property" type="Int32"> 
          <column name="MessagePosition"/> 
        </property> 
        <many-to-one name="ParentMessage" access="property" class="MessageResult, Data" column="MessageResults_ID" /> 
        <many-to-one name="ParentField" access="property" class="FieldResult, Data" column="ParentField_ID" /> 
        <bag name="Children" access="property" table="FieldResults" lazy="false" cascade="all" order-by="Field_ID"> 
          <key column="ParentField_ID" /> 
          <one-to-many class="FieldResult, Data" /> 
        </bag> 
      </class> 
    </hibernate-mapping>`