+1 I've seen the same behaviour while debugging another problem. Immediately after running through my OnPreInsert code for all the entities being created, the OnPreUpdate is called for all the same entities.
On Aug 11, 9:57 am, sirrocco <[email protected]> wrote: > If in an Event , onOnPreInsertI set a property ( RecordStamp) like > so : > > var index = Array.FindIndex(names, n => n == "RecordStamp"); > if (index == -1) return; > > state[index] = DateTimeService.Now; > > Can this cause an update after the insert ? The thing is that after > the app entersOnPreInsert, then on Commit it goes through the > OnPreUpdate. > > The entity has an identity PrimaryKey. > The flow would be like this : > > Entity e = new Entity() > session.Save(e) ->OnPreInsert > > Commit -> OnPreUpdate > > Any explanation of the behavior is much appreciated . --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
