-->
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.  [ 1 post ] 
Author Message
 Post subject: PersistentGenericSet problem on One-to-Many link.
PostPosted: Tue Dec 14, 2010 5:06 am 
Newbie

Joined: Tue Dec 14, 2010 4:46 am
Posts: 4
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;


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

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.