I am using the PostFlush in the DefaultFlushEventListener to try and get
any saved entities so that I can raise some domain events to say that the
relevant entities have changed, now I want to do this in the batch and am
using something like this atm:
var entityEntries = session.PersistenceContext.EntityEntries;
var entitiesByType = entityEntries.Keys
.Cast<EntityBase>()
.Where(x => ((EntityEntry)entityEntries[x]).LockMode ==
LockMode.Write)
.GroupBy(x => x.GetType(), x => x);
This groups changes by type for me and using the LockMode check it seems to
give me only changed entities. I had hoped I could use Status ==
Status.Saving but this did not seem to work, is my check going to be ok or
is there a better way to check if the entry is dirty.
Thanks
Stefan
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/nhusers/-/J4FleMSCLbQJ.
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.