I cannot see anything wrong with the code that you have shown. You need to give us more information on the error that is occuring, and your entity mappings.
On Wed, Jul 29, 2009 at 4:57 AM, Nigel <[email protected]> wrote: > > I have an entity with children. I need to loop through the children > and update a date time field. When I try to save the parent (item) or > the child (doc) I get the Don't change the reference to a collection > with cascade="all-delete-orphan" error. Funny thing is I don't think I > am changing the reference to the collection, just setting a date > field. > > I get this error whether I save with the parent _opsItemRepository or > the _OpsItemRepository. > > var item = _OpsItemRepository.Get(OpsItemId); > if (item != null) > { > foreach (var doc in item.OpsDocs) > { > var fullFileName = Path.Combine > (TIFDestinationPath, doc.OpsDocId + ".TIF"); > if (!doc.Exported.HasValue) > { > if (File.Exists(finalFileName)) > { > doc.Exported = DateTime.Now; > _OpsDocRepository.SaveOrUpdate(doc); > } > } > } > } > > > Any ideas? > > Thanks, > Nigel > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Fluent NHibernate" 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/fluent-nhibernate?hl=en -~----------~----~----~----~------~----~------~--~---
