Thanks for the clarification Fabio. I think I misinterpreted the purpose of flush listeners. I thought they were called when an entity was dirty, but they are called to determine if an entity is dirty. What this basically means to me is that I better not replace the default flush listener with mine unless I want to assume the responsibility of dirtyness, right? An like you said, checking the event for dirty properties will let me know if anything was dirty, assuming default flush listener came first
sorry for any confusion.. On Tue, Oct 21, 2008 at 1:50 PM, Fabio Maulo <[EMAIL PROTECTED]> wrote: > sorry if I repeat my self....I'm going to try to interpreter your > questions literally. > >>Is this by design? > It is by design. > >>If so, why? > Because the implementor of IFlushEntityEventListener is responsible to > check if an entity instance need to be flushed when a session.Flush() is > required. > > > 2008/10/21 Craig Neuwirt <[EMAIL PROTECTED]> > > I really like GhostBusters fixture. I passed all tests. However, when my >> app runs I am seeing the flush event listener fire for entities with no >> dirty properties. That is what is confusing. I wouldn't expect to have an >> event for an entity with no dirty properties. >> >> craig >> >> >> On Sun, Oct 19, 2008 at 2:39 PM, Fabio Maulo <[EMAIL PROTECTED]>wrote: >> >>> 2008/10/19 Craig Neuwirt <[EMAIL PROTECTED]> >>> >>>> Before I start my examinations, can you explain when under what >>>> scenarios the flush entity listener will be called with an entity that has >>>> no dirty properties? >>>> >>> >>> Do you mean when you think that there is no dirty property ? >>> In the article I'm showing a very simple case where even if my code don't >>> change the entity, the entity state is dirty.In these years I found many >>> different cases of wrong mappings-class (in some customers app)... I make >>> the "Ghostbuster" public and now you can find where are your "ghosts". >>> >>> I don't understand if you read the article. >>> >>> If you can pass the test in the article you don't have errors in your >>> mapping-classImplementation so you can write your UnitTest to report the >>> bug. >>> -- >>> Fabio Maulo >>> >>> >>> >> >> >> > > > -- > 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 -~----------~----~----~----~------~----~------~--~---
