Reputation: 51
How can I add a event listener for SaveOrUpdateCopy in NHibernate ? I see that the ListenerType enumeration does not have a 'SaveOrUpdateCopy' type. I tried using the 'Merge' type, but that adds it to the MergeEventListeners collection. The SaveOrUpdateCopy invokes the events from the SaveOrUpdateCopyEventListeners collection.
How can I add my event class to the SaveOrUpdateCopyEventListeners collection in NHibernate?
Upvotes: 4
Views: 346
Reputation: 3111
On our project :
listeners.SaveOrUpdateEventListeners = new ISaveOrUpdateEventListener[]
{ new TrackChangeFlushEntityEventListener(),
new DefaultSaveOrUpdateEventListener()
};
works for SaveOrUpdateCopy
Upvotes: 1