Mike Cole
Mike Cole

Reputation: 14763

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

I have my Parent object, which contains an ICollection of Children 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!

Upvotes: 1

Views: 86

Answers (1)

Mike Cole
Mike Cole

Reputation: 14763

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

Upvotes: 2

Related Questions