Hey Oskar, What you say makes perfect sense. Don't know how I got it into my head that Get returned a proxy, but I guess I never really thought about it, it just worked.
Thanks for the reply. On Jun 22, 11:35 am, Oskar Berggren <[email protected]> wrote: > This is the way I understand it: NH keeps an in-memory-table of the > property values as fetched from the database. Dirty tracking compares > the current property values of tracked objects with the "fetched > state" as found in the "in-memory-table". This does not require > proxies. > > The proxies are there to represent objects that may not yet be loaded > from the DB, but referenced by objects that _are_ loaded. The proxy > will detect an attempt to access it, and then go fetch the true object > from the database. > > Since Get()'s single purpose is to load an object, no proxy is > necessary. Load() will, however, create a proxy. > > /Oskar > > 2010/6/22 Joe <[email protected]>: > > > > > Hi All, > > > I am a bit confused on what session.Get is doing. I always thought > > that Get would return a proxy and that along with the session is how > > change tracking is done. > > > When I get an object I don't see that a proxy returned, however I do > > see it on Session.Load and on Lazy Loaded associations. > > > I set dynamic-update = true on the object and still did not get a > > proxy. > > > So I assume my understanding of session.Get is wrong. > > > Can anyone provide a bit more insight on how change tracking works? Is > > change tracking only done on the session? How is it tracking changes > > without a proxy? > > > Thanks in advance, > > > Joe > > > -- > > 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 > > athttp://groups.google.com/group/nhusers?hl=en. -- 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.
