As I said IPostUpdateEventListener is called ones and was tested.If, in your
personal case, "is called twice" you should provide something as a test and
then we can say why PostUpdate "is called twice".

Instead respond to this post invest your time to create a test case.

2009/6/5 MattF <[email protected]>

>
> yes, both tables get updated, that is what i was saying.
>
> however should IPostUpdateEventListener get called twice, even know
> the parameters seem to be the same.
>
> if it is expected that IPostUpdateEventListener gets called twice, can
> you tell me what parameters are different in each call?
>
> because i am using the IPostUpdateEventListener for audit logging it
> means i get two entries logged for each table.
> because i log all changes each time IPostUpdateEventListener is
> called.
>
> e.g.
> Table    column    oldvalue    newvalue
> ---------------------------------------------------------
> base     Version        1               2
> sub           X             3               4
> base     Version        1               2
> sub           X             3               4
>
> On Jun 6, 1:44 am, Fabio Maulo <[email protected]> wrote:
> > what mean "i update the derived class" ?an update to a derived class mean
> an
> > update in both tables (tabler-per-class ORM theory).
> > If you want another behavior you should use another persistent
> > representation as : table-per-concrete-class (<union-subclass>)
> >
> > 2009/6/5 MattF <[email protected]>
> >
> >
> >
> >
> >
> > > "> What mean exactly the "P.S." ?2 session factory ?
> > > > same class mapped twice"
> >
> > > i mean i have one class which maps to a table, and then a derived
> > > class which maps to another table (and both have the same ID)
> > > (and i update the derived class)
> >
> > > so it uses the JoinedSubclassEntityPersister
> >
> > > On Jun 5, 10:34 pm, Fabio Maulo <[email protected]> wrote:
> > > > What mean exactly the "P.S." ?2 session factory ?
> > > > same class mapped twice ?
> >
> > > > 2009/6/5 MattF <[email protected]>
> >
> > > > > i don't know if this is a bug, or there is a reason for this.
> >
> > > > > also i am using NHibernate through ActiveRecord so it could be
> because
> > > > > of that, but i don't think so.
> >
> > > > > i have created an eventListener that implements
> > > > > IPostUpdateEventListener and my OnPostUpdate method gets called
> twice
> > > > > for each update.
> >
> > > > > is there a reason for this, or is it a bug?
> >
> > > > > p.s. my model that gets updated is a model that derives from
> another
> > > > > model i.e. there are two tables involved. so i don't know if that
> has
> > > > > anything to do with it
> >
> > > > --
> > > > Fabio Maulo
> >
> > --
> > 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to