Hey,
I'm a newbie on NHibernate, and sorry for my kinda dummy question.
I try to make one-to-many connection between my two tables. (You know, to get the rows from second table which has equal ID with the first table.) To do this, I add this line to my first table's XML file:
<set lazy="true" batch-size="6" table="MYCHILDTABLE" name="ChildName" fetch="join" inverse="false" cascade="all" > <key column="ROWIDENTITY"/> <one-to-many class="MyChildTableClass" /> </set>
It gives no errors on compilation and running. But after I get the data, I get this error:
'NHibernate.Collection.Generic.PersistentGenericSet`1[ChildTableDotNetClass]' type object can not be attached to 'System.Collections.Generic.List`1[ChildTableDotNetClass]' type object. (Btw its not the original script, I translated it to English.)
Appearently, I couldnt set the class of the object, so I get the data, but I can't bind it to the ChildTableObject.
What should I do?
Thanks;
|