Pre* events 2009/7/13 Graham Bunce <[email protected]>
> > All, > > I've implemented a base entity class that all my business entities > inherit from. What I need to do is to add events that this common > class raises when certain things happen on it (e.g. CRUD style stuff). > There is business logic that takes place on (e.g.) create of an > entity. > > I was thinking of adding events to the base entity that could be > hooked into by inheriting business logic and then this base class > hooking into the NH event system (IPreUpdateEventListener, > IPreInsertEventListener). > > This business logic is unknown by me (as I'm developing a framework > for extending later by different projects). However, this business > logic could easily be updating entity data (e.g On save, check the > time, set a Late Action flag) but this will never get saved as by the > point NH raises the events I'm hooked into I MUST change the state > object. My business classes are not aware of this, nor am I able to > make them so. > > Any ideas? Is there any NH event I can use that will let me change the > object data itself and still have this propagated down to the database > through NH? > > > -- Fabio Maulo --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
