A B sess.load<A> won't hit the database so nhib will create an A proxy instance for you, making it possible to fill A (and B) with data later.
If you query for A objects (and no eager fetching is used), you will get A's data back and therefore a "real" A instance can be created. However B will be proxied (assuming lazy!=false). Maybe you've misunderstood and thought that the "owner" should be proxied? It's the (unloaded) referenced objects that will be proxied. /Roger From: nhusers@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Sean Fuhrmann Sent: den 28 oktober 2008 15:25 To: nhusers@googlegroups.com Subject: [nhusers] Proxied entities... I get a little foggy when I am trying to figure out some of the dynamic proxy stuff... So here is what I am seeing, could someone possibly validate that this is how it is supposed to work, if so why, and how? If I load an Entity via Load<SomeEntity>, the entity comes back as a proxied object as I expect, it implements INHIbernateProxy, the type is actually DynamicProxy_Something_or_other etc, etc. However, when entities come back from a query, they do not appear to be proxied, it appears to be the actual type (it does not implement INHIbernateProxy, and is not DynamicProxy_Something_or_other). BUT, it still lazy loads properties and bags, which is what I can't seem to get my head around. Are the entities coming back from a query supposed to be different? And if so, how can my entity still lazy load if it is not in proxy form (it must be in some capacity right?) ? Any insight on this would be great. Thanks!! -Sean --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to nhusers@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---