SaveOrUpdate triggers an UPDATE regardless the entity has changed or
not. I'm not sure about session.Merge.


On 3 avr, 15:00, Gustavo Ringel <[email protected]> wrote:
> session.SaveOrUpdate or session.Merge should be enough for this case...
> I really don't think that sending domain object through the wire is a good
> practice. But it works for small apps.
>
> Gustavo.
>
> On Fri, Apr 3, 2009 at 4:23 PM, graphicsxp <[email protected]>wrote:
>
>
>
> > Hi,
>
> > Normally NH is able to detect any changes made to entities and
> > when .save() is called, the UPDATE will be made only if the entity was
> > changed.
>
> > Now the issue is that I'm sending my entities across the wire from the
> > server to the client (via WCF), the client modifies the entity (or
> > not), clicks on a save button and the entity is sent back to the
> > server. How can NH detects the entity has changed since it does not
> > belong to the same session ?
>
> > Thanks
--~--~---------~--~----~------------~-------~--~----~
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