These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: IndexOutOfRange exception
PostPosted: Thu Feb 05, 2009 12:00 pm 
Newbie

Joined: Tue Dec 16, 2008 10:24 am
Posts: 4
I'm having trouble getting a NHibernate mapping file to compile correctly. It's XML code is as follows:

Code:
<?xml version="1.0" encoding="utf-8"?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" default-lazy="false">
  <class name="WiscNet.Database.Model.SiteCANS, WiscNet.Database.Model" table="SiteCANS"
    proxy="WiscNet.Database.Model.SiteCANS, WiscNet.Database.Model">
    <id name="SiteCode" column="SiteCode" type="String">
      <generator class="native" />
    </id>
    <property name="AAMFON" column="AAMFON" type="Boolean" not-null="false" />
    <property name="CINC" column="CINC" type="Boolean" not-null="false" />
    <property name="FoxNet" column="FoxNet" type="Boolean" not-null="false" />
    <property name="Madison" column="Madison" type="Boolean" not-null="false" />
    <property name="Milwaukee" column="" type="Boolean" not-null="false" />
  </class>
</hibernate-mapping>


Can anyone help me figure out why the first mapping file won't compile?

The above mapping file pertains to a table in my database that relates to another table whose mapping file is as follows:

Code:
<?xml version="1.0" encoding="utf-8"?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" default-lazy="false">
  <class name="WiscNet.Database.Model.Member, WiscNet.Database.Model" table="Members" lazy="false">
    <id name="SiteCode" column="SiteCode" type="String" length="25" unsaved-value="null">
      <generator class="assigned" />
    </id> 
    <property name="Institution" column="Institution" type="String" length="50" not-null="false" />
    <property name="MemberType" column="MemberType" type="String" length="25" not-null="false" />
    <property name="MemberGroup" column="MemberGroup" type="String" length="25" not-null="false" />
     <property name="Latitude" column="Latitude" type="Decimal" update="false" not-null="false" />
     <property name="Longitude" column="Longitude" type="Decimal" update="false" not-null="false" />
     <property name="Elevation" column="Elevation" type="Decimal" update="false" not-null="false" />
     <property name="primeURL" column="primeURL" type="String" length="255" update="false" not-null="false" />
    <property name="Taxable" column="Taxable" type="Boolean" not-null="false" />
    <property name="Billable" column="Billable" type="Boolean" not-null="false" />
    <property name="CBSCode" column="CBSCode" type="String" length="25" not-null="true" />
    <property name="SuperSite" column="SuperSite" type="String" length="25" not-null="false" />
    <property name="SuperSiteRelation" column="SuperSiteRelation" type="String" length="25" not-null="false" />
    <property name="LastUpdate" column="LastUpdate" type="DateTime" not-null="false" />
    <set name="MemberContacts" lazy="true" inverse="true" order-by="ContactId">
      <key column="SiteCode" />
      <one-to-many class="WiscNet.Database.Model.MemberContact, WiscNet.Database.Model" />
    </set>
    <set name="MemberDomains" lazy="true" inverse="true" order-by="Id">
      <key column="SiteCode" />
      <one-to-many class="WiscNet.Database.Model.MemberDomain, WiscNet.Database.Model" />
    </set>   
    <set name="MemberShipping" lazy="true" inverse="true" order-by="ContactID">
      <key column="SiteCode" />
      <one-to-many class="WiscNet.Database.Model.MemberShipping, WiscNet.Database.Model" />
    </set>
   <set name="MemberContactsServices" lazy="true" inverse="true" order-by="ContactId">
       <key column="SiteCode" />
       <one-to-many class="WiscNet.Database.Model.MemberContactService, WiscNet.Database.Model" />
     </set>
   <set name="MemberContactsWorkgroups" lazy="true" inverse="true" order-by="ContactId">
       <key column="SiteCode" />
       <one-to-many class="WiscNet.Database.Model.MemberContactWorkgroup, WiscNet.Database.Model" />
     </set>
   <set name="MemberContactsGovernance" lazy="true" inverse="true" order-by="ContactId">
       <key column="SiteCode" />
       <one-to-many class="WiscNet.Database.Model.MemberContactGovernance, WiscNet.Database.Model" />
     </set>
   <set name="MemberContactsFiscal" lazy="true" inverse="true" order-by="ContactId">
       <key column="SiteCode" />
       <one-to-many class="WiscNet.Database.Model.MemberContactFiscal, WiscNet.Database.Model" />
     </set>
   <set name="MemberContactsStrategic" lazy="true" inverse="true" order-by="ContactId">
       <key column="SiteCode" />
       <one-to-many class="WiscNet.Database.Model.MemberContactStrategic, WiscNet.Database.Model" />
     </set>
   <set name="MemberContactsInternal" lazy="true" inverse="true" order-by="ContactId">
       <key column="SiteCode" />
       <one-to-many class="WiscNet.Database.Model.MemberContactInternal, WiscNet.Database.Model" />
     </set>
     <set name="SiteCANS" lazy="true" inverse="true" order-by="SiteCode">
       <key column="SiteCode" />
       <one-to-many class="WiscNet.Database.Model.SiteCANS, WiscNet.Database.Model" />
     </set>
  </class>
</hibernate-mapping>


Can anyone help me figure out why the first mapping file won't compile?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 05, 2009 1:15 pm 
Expert
Expert

Joined: Thu Dec 14, 2006 5:57 am
Posts: 1185
Location: Zurich, Switzerland
What does the inner exception say ?

_________________
--Wolfgang


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.