开发者

Adding object to child collection causes entire collection to load in Fluent NHibernate

开发者 https://www.devze.com 2022-12-30 11:02 出处:网络
I have my Parent object, which contains an ICollection of Chi开发者_开发知识库ldren objects.The Children are lazy loaded and I do not need them in the context of my scenario.However, when I try to add

I have my Parent object, which contains an ICollection of Chi开发者_开发知识库ldren objects. The Children are lazy loaded and I do not need them in the context of my scenario. However, when I try to add a new child object to my Children collection, it kicks off the lazy load and loads all 7000 child records.

I assume I am making a newbie mistake. Anybody out there know how I can fix this?

Thanks!


I added the Inverse() call to my mapping, and all is well now.

0

精彩评论

暂无评论...
验证码 换一张
取 消