Java Mailing List Archive

http://www.gg3721.com/

Home » the NHibernate development list »

[NHibernate-development] Fwd: [nhibernate-issues] [JIRA] Updated:
 (NH-573) New method to "completely load" a proxy.

Ayende Rahien

2008-10-04


Author LoginPost Reply
How was this fix? I am not seeing a related checkin

---------- Forwarded message ----------
From: NHibernate Jira <nhjira@gmail.com>
Date: Tue, Sep 30, 2008 at 3:47 PM
Subject: [nhibernate-issues] [JIRA] Updated: (NH-573) New method to "completely load" a proxy.
To: nhibernate-issues@lists.sourceforge.net



    [ http://jira.nhibernate.org/browse/NH-573?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fabio Maulo updated NH-573:
---------------------------

   Fix Version/s:     (was: 2.1.0.Alpha1)

> New method to "completely load" a proxy.
> ----------------------------------------
>
>                 Key: NH-573
>                 URL: http://jira.nhibernate.org/browse/NH-573
>             Project:  NHibernate
>          Issue Type: New Feature
>          Components: Core
>    Affects Versions: 1.0.2
>            Reporter: Jerome Haltom
>            Priority: Minor
>
> A lot of the time I find myself in a position to need to know the runtime type of a mapped class. Proxies break this by design, which isn't itself a problem, but I need a way around it.
> Contract.Client is of type Client. Institution inherits from Client. Contract.Client may be an Institution. The only way to know is to attempt to load the Client object. The proxy however subclasses Client, without loading Institution. This results in the expression "contract.Client is Institution" never being valid.
> I'm not suggesting you fix this, as it's not really fixable by my view. I just need a quick way to get around it. I suggest a method like the following:
> session.Get(contract, "Client")
> This expression, or one similar to it, would immediatly go to the database and retrieve the proper type for the Client property, and set it. It would make situations like this much easier to work around.
> This method should also fix up any other references to the same instance in the entire session.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.nhibernate.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
nhibernate-issues mailing list
nhibernate-issues@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nhibernate-issues

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Nhibernate-development mailing list
Nhibernate-development@(protected)
https://lists.sourceforge.net/lists/listinfo/nhibernate-development
©2008 gg3721.com - Jax Systems, LLC, U.S.A.