Hibernate version:
NHibernate 1.0.2
I have 2 classes (A,B), with these mappings:
Code:
Class A
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0">
<class name="Map.A,Map" table="tabA" lazy="false">
<composite-id access="field">
<key-property name="Id" column="id" type="String" />
<key-property name="Idlt" column="idlt" type="Int32" />
</composite-id>
....
</class>
</hibernate-mapping>
Code:
Class B
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0">
<class name="Map.B,Map" table="tabB" lazy="false">
<id name="Id" column="id" type="Int32" unsaved-value="0">
<generator class="assigned"/>
</id>
<many-to-one name="AObj" class="Map.A,Map" unique="true" update="false" insert="false">
<column name="idlt" />
<column name="id"/>
</many-to-one>
So, when I trie to Load "B" object I got the error "Input string was not in a correct format".
"could not load an entity: [Map.B#10000]"} System.Exception {NHibernate.ADOException}
Help?