Hey guys, i'm running an SDF database with Nhibernate, and i'm getting
this error while trying to save the following object:

<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
assembly="Topshelf.CostCalc.Data"
namespace="Topshelf.CostCalc.Data.Model" default-lazy="false">
  <class xmlns="urn:nhibernate-mapping-2.2" name="Transaction"
table="Transactions">
    <id name="Id" unsaved-value="0">
      <column name="Id" sql-type="int" not-null="true" unique="true"/>
      <generator class="native"></generator>
    </id>

    <many-to-one class="Topshelf.CostCalc.Data.Model.Category"
                 not-found="exception" not-null="false"
name="Category"
                 column="CategoryId" cascade="none"></many-to-one>

    <property name="Description" type="string" length="255"></
property>
    <property name="Amount" type="double"></property>
    <property name="IsCost" type="Boolean"></property>
    <property name="Date" type="DateTime"></property>

    <many-to-one class="Topshelf.CostCalc.Data.Model.Category"
lazy="false"
                 not-found="exception" not-null="false" name="Person"
                 column="Person" cascade="none" />

  </class>


the category class looks like this:



    <id name="Id" unsaved-value="0">
      <column name="Id" sql-type="int" not-null="true" unique="true"/>
      <generator class="native"></generator>
    </id>

    <many-to-one class="Category" fetch="join" lazy="false" not-
found="exception" name="Parent"
                 column="ParentId" cascade="none"></many-to-one>


    <property name="Name" type="string" length="255" unique="true" not-
null="true"></property>
    <property name="Description" type="string" not-null="true"></
property>
    <property name="IsCost" type="Boolean" not-null="true"></property>

    <bag name="Children" cascade="all-delete-orphan" lazy="false"
inverse="true">
      <key column="ParentId" />
      <one-to-many class="Category" not-found="exception"/>
    </bag>




according to other posts it has to do something with the bag or the
many to one in the category, but i don't have any idea of how to fix
it. anyone has some good ideas? thx
--~--~---------~--~----~------------~-------~--~----~
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