No, the reference should be inflated when you access the Post property.

On Thu, Dec 31, 2009 at 12:44 PM, Richard Brown (gmail) <
[email protected]> wrote:

>  I take it the reference would inflate when *any* method is called on the
> Comment proxy?
> (and not just the property accessor)
>
>
>  *From:* Ayende Rahien <[email protected]>
> *Sent:* Thursday, December 31, 2009 9:32 AM
> *To:* nhibernate-development <[email protected]>
> *Subject:* [nhibernate-development] Ghost objects
>
> I am trying to figure out if we can support the following:
>
> class Comment
> {
>    public virtual Post Post {get;set;}
> }
>
> class Post {}
> class Article : Post {}
>
> And *not* generate a PostProxy for the property, but instead detect the
> property access, force a load to return the correct type.
> We can do it right now by specifying lazy=false, but that pre-load the
> entity, while I would like to try to get it to load only on access time.
>
> There are several potential problems with this:
> a) we need to replace the reference on first access, which means that the
> _parent_ must be a proxy as well.
> b) we disallow field access entirely.
> c) identity map issues?
>
> other thoughts?
>

Reply via email to