Update.. I have other tables with the same column that is mapped exactly the same and it works fine.
The difference with the table that dont work is that is contains a discriminator column. Here is the full mapping
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0">
<class name="ValueObjects.General.CigEntity, ValueObjects" table="c_ge_CigEntity" discriminator-value="-99">
<id name="CId" column="CId" type="Int32" unsaved-value="0">
<generator class="native"/>
</id>
<discriminator column="Type" type="Int32"/>
<property name="IsSearchable" column="IsSearchable" type="Boolean"/>
<property name="ProviderId" column="ProviderId"/>
<property name="OriginId" column="OriginId"/>
<property name="Inserted" column="Inserted" type="Nullables.NHibernate.NullableDateTimeType, Nullables.NHibernate"/>
<property name="InsertedBy" column="InsertedBy"/>
<property name="Updated" column="Updated" type="Nullables.NHibernate.NullableDateTimeType, Nullables.NHibernate"/>
<property name="UpdatedBy" column="UpdatedBy" type="Nullables.NHibernate.NullableInt32Type, Nullables.NHibernate"/>
<property name="Disabled" column="Disabled" type="Boolean"/>
<many-to-one name="Origin" class="ValueObjects.General.Lookup.Origin,ValueObjects" column="OriginId" insert="false" update="false"/>
<one-to-one name="Detail"
class="ValueObjects.General.CigEntityDetail,ValueObjects"
constrained="false"
cascade="none"
/>
<bag name="Address" inverse="true" cascade="all-delete-orphan" lazy="true">
<key column="CId"/>
<one-to-many class="ValueObjects.General.Address.Address,ValueObjects"/>
</bag>
<bag name="Identification" inverse="true" cascade="all-delete-orphan" lazy="true">
<key column="CId"/>
<one-to-many class="ValueObjects.General.Identification.IdNumber,ValueObjects"/>
</bag>
<bag name="PhoneNumber" inverse="true" cascade="all-delete-orphan" lazy="true">
<key column="CId"/>
<one-to-many class="ValueObjects.General.Phone.PhoneNumber,ValueObjects"/>
</bag>
<subclass name="ValueObjects.General.CigEntityIndividual, ValueObjects" discriminator-value="1">
<many-to-one name="Individual" class="ValueObjects.General.Individual.Individual, ValueObjects" column="CId" insert="false" update="false"/>
</subclass>
<subclass name="ValueObjects.General.CigEntityCompany, ValueObjects" discriminator-value="2">
<many-to-one name="Company" class="ValueObjects.General.Company.Company, ValueObjects" column="CId" insert="false" update="false"/>
</subclass>
</class>
</hibernate-mapping>
This worked fine before I updated to 1.0
Any??
Regards,
Haukur
|