Hello,
 
I'm having trouble to get NHibernate sets being serialized using the 
DataContractSerializer. 
I have a Customer class (DTO) that includes the properties id, firstname, 
lastname and orders, the orders are being mapped as set (while in my class 
definition its type is ISet<Order>).
Now when I try to send this DTO via the WCF wire, I always get lazy load 
errors, and it seems that this is because of the orders ISet collection.
If I remove the orders definition, everything works fine. 
Also if I use NetContractSerializer instead of DataContractSerializer it 
works, too. 
The only option I found to get it to work with DataContractSerializer is to 
replace the type from ISet<Order> to ICollection<Order>. 
Is this a good solution, or am I then missing any functionality by using 
ICollection instead? 
 
Thanks  a lot. 
 

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"nhibernate-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to