@Dario,
The flush/commit is taking part at the very end of the request and not
in my business/service code.  It is automatic and happens always.

@Fabio,
I don't call a session.SaveOrUpdate from my HttpModule where the flush/
commit is being performed.  The entity exists in the session because
it was loaded from a repository earlier in the business/service code.
Once it is in there, unless I evict it or clear the session the object
will be persisted even when SaveOrUpdate is not called.


Now I have a good feeling that my ignorance in NHibernate is now being
displayed with great resonance.  Please feel free to tell me how
stupid I'm being here and set me straight :)

Thanks.
Gary Brunton


On Jun 19, 4:04 pm, Fabio Maulo <[email protected]> wrote:
> 2009/6/19 Gary Brunton <[email protected]>
>
>
>
> > Now I'm not sure that this expatiation is any better but I wanted to
> > update what I've decided just in case this does make sense to someone.
>
> What I do, in general, is check the state of an entity before call the
> method, to persist an entityState, of the DAO (if the entity has an invalid
> state I never call session.SaveOrUpdate).
> --
> 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