I have a class/table that has a collection(IList) of details.  I am
trying to get NHibernate to delete these details when I remove them
from the collection.

So...simply I am trying to do this...

1. Clear (.Clear()) or Remove (.Remove(JobDetail)) from the class
2. Call Update on the class to update the table and remove the child
(ren) that have been removed from the collection

This is resulting in this error:

could not delete collection: [TEAMS_ORM.Job.JobDetails#30010][SQL:
UPDATE dbo.tblJobDetails SET JobID = null WHERE JobID = @p0]

So it is trying to set the JobID(the relational id) to null rather
than deleting these items.

I do have cascade="all" although I don't believe that has any bearing
on this situation as I am not deleting the parent just the children.

I would prefer not to remove these explicitly so is there some method
that I am overlooking for achieving my desired result?

Thank you for your help in advance.
Josh
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to