inverse means the root entity is not responsible for the id of child. the child is itself an entity and will manage it's own POID.
What do you're mappings look like? I would assume you have cascade="all" or all-delete-orphan. The strategies will use NH to manage the deletion rather than letting the database delete child relations through FK cascades. if you set cascade="save-update" with the key as on-delete="cascade" the database should manage the deletion of related entities, if it supports cascade deletes. if it doesn't you can also look into batching ADO.Net calls. This may not work depending on your POID strategy. On Aug 26, 4:22 pm, MattO <[email protected]> wrote: > How do you overcome the issue with nHibernate where collections that > are mapped with inverse="true" will be issued a delete statement for > every object in the collection? > > Right now this has added about 50 seconds to a single delete operation > which normally only took less than a second to perform in straight > ADO .NET by performing a delete based on the primary key of the > parent. > > According to the nHibernate reference manual section 17.5.4 (one shot > delete), by discarding (dereferencing) the original collection and > returning a newly instantiated collection with all the current > elements. > > Can someone please tell me what they mean with a code sample if this > also applys to inverse="true" collections, or is there some other > option other then manually handling deletes for these types of > collections yourself? -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
