Can you show your code where you are updating the collection? If you clear
the collection by calling .Clear() then add new items then you should be
able to get the effect you want.
Suhas
On Monday, 5 January 2015 13:18:02 UTC, Danny Stommen wrote:
>
> Hi all,
>
> I have a parent object with child object.
>
> In my parent mapping I have the following:
> HasMany(x =>
> x.Childs).Table("child_table").KeyColumn("ParentId").Cascade.AllDeleteOrphan().Inverse().BatchSize(100);
>
> NH does correctly insert/delete the child records upon update of the
> parent, but to achieve this, it does
> 1) select on the child_table
> 2) insert new child records (if any)
> 3) delete child records one by one (if any).
>
> Especially this last part is concerning, if you have large child
> collections.
>
> What I want to do is:
> 1) delete all records from child_table by parent id.
> 2) insert all new records.
>
> Is this possible?
>
> Thanks,
> Danny
>
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.