Have been running an application under .Net 2.0 with NH 2.1 for a year
now and that worked without problems. After upgrading this to .Net 4.0
I only needed to address the ISet issue but for the rest it compiles
and runs great (still using NH 2.1)

However when I changed the same code to NH 3.1 suddenly I get compile
errors about my hbm.xml mapping files. Is anyone aware of changes that
need to be applied to these files? Would have expected issues
between .Net versions but not with the change to NH 3.1.

The first file it complains about is this crew mapping file, which it
crashes on with an "Ambiguous Match Exception" during the init of the
session factory. Anyone having seen this before? Am wondering about
the "field.pascalcase-m-underscore" mapping but again it works all
fine with NH 2.1

<?xml version="1.0" encoding="utf-8"?>
<hibernate-mapping auto-import="true"
                   default-lazy="true"
                   assembly="MAF.DB"
                   namespace="MAF.DB.BusinessObject"
                   default-access="field.pascalcase-m-underscore"
                   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="Crew" dynamic-update="true">
      <id name="CrewID">
         <generator class="MAF.DB.Access.PKGenerator, MAF.DB" />
      </id>
      <version name="Version" access="field" type="Byte"/> <!--
enables optimistic locking -->
      <set name="CrewChecks" inverse="true" cascade="all-delete-
orphan">
         <key column="CrewID"/>
         <one-to-many class="CrewCheck"/>
      </set>
      <property name="DisplayName"/>
      <many-to-one name="Homebase"
                   class="Airstrip"
                   column="HomebaseID"/>
      <many-to-one name="Nationality"
                   class="Country"
                   column="NationalityID"/>
      <many-to-one name="ProgrammeCountry"
                   class="Country"
                   column="ProgrammeCountryID"/>
      <property name="Name"/>
      <property name="PassportNumber"/>
      <property name="Weight"
type="MAF.DB.BusinessObject.WeightUserType, MAF.DB"/>
      <property name="Active"/>
      <property name="Comments"/>
      <property name="EmailAddress"/>
      <property name="DisplayColour"/>
      <property name="CStripRated"/>
      <property name="LimitationType"/>
      <many-to-one name="ACTypeLimitation"
                   class="AircraftType"
                   column="ACTypeLimitationID"/>
      <property name="FlightTime1DayLimit"/>
      <property name="FlightTime7DayLimit"/>
      <property name="FlightTime28DayLimit"/>
      <property name="FlightTime90DayLimit"/>
      <property name="FlightDutyTime1DayLimit"/>
      <property name="FlightDutyTime7DayLimit"/>
      <property name="FlightDutyTime14DayLimit"/>
      <property name="FlightDutyTime28DayLimit"/>
      <property name="FlightDutyTime90DayLimit"/>
      <property name="TotalDutyTime1DayLimit"/>
      <property name="TotalDutyTime7DayLimit"/>
      <property name="TotalDutyTime14DayLimit"/>
      <property name="TotalDutyTime28DayLimit"/>
      <property name="LastLandingTime"
type="MAF.DB.BusinessObject.TimeSpanUserType, MAF.DB"/>
      <property name="FuelReserve"/>
      <property name="LastModified"/>
      <property name="LastModifiedBy"/>
   </class>
   <sql-query name="IsCrewAvailable">
      <query-param name="CrewID" type="String"/>
      <query-param name="StartPeriod" type="Date"/>
      <query-param name="EndPeriod" type="Date"/>
      <query-param name="IgnoreFlightID" type="String"/>
      <return-scalar column="Reason" type="String"/>
      <![CDATA[EXEC IsAvailable
NULL, :CrewID, :IgnoreFlightID, :StartPeriod, :EndPeriod]]>
   </sql-query>
   <sql-query name="CrewLastLandedAt">
      <query-param name="CrewID" type="String"/>
      <query-param name="BeforeDate" type="Date"/>
      <return-scalar column="AirstripID" type="String"/>
      <![CDATA[EXEC LastLandedAt NULL, :CrewID, :BeforeDate]]>
   </sql-query>
</hibernate-mapping>

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to