Re: [nhibernate-issues] [JIRA] Updated: (NH-573) New method to "completely load" a proxy.
"Ayende Rahien" <[email protected]> Sat, 4 Oct 2008 23:26:56 +0300
| Newsgroups | gmane.comp.windows.dotnet.nhibernate.devel |
|---|---|
| Message-ID | <[email protected]> |
--===============7188301740463206196== Content-Type: multipart/alternative; boundary="----=_Part_18359_11363147.1223152016950" ------=_Part_18359_11363147.1223152016950 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Nevermind, this is setting the fix version. On Sat, Oct 4, 2008 at 11:25 PM, Ayende Rahien <[email protected]> wrote: > How was this fix? I am not seeing a related checkin > > > ---------- Forwarded message ---------- > From: NHibernate Jira <[email protected]> > Date: Tue, Sep 30, 2008 at 3:47 PM > Subject: [nhibernate-issues] [JIRA] Updated: (NH-573) New method to > "completely load" a proxy. > To: [email protected] > > > > [ > 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 > [email protected] > https://lists.sourceforge.net/lists/listinfo/nhibernate-issues > > ------=_Part_18359_11363147.1223152016950 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline <div dir="ltr">Nevermind, this is setting the fix version.<br><br><div class="gmail_quote">On Sat, Oct 4, 2008 at 11:25 PM, Ayende Rahien <span dir="ltr"><<a href="mailto:[email protected]">[email protected]</a>></span> wrote:<br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div dir="ltr">How was this fix? I am not seeing a related checkin<div><div></div><div class="Wj3C7c"><br><br><div class="gmail_quote"> ---------- Forwarded message ----------<br>From: <b class="gmail_sendername">NHibernate Jira</b> <span dir="ltr"><<a href="mailto:[email protected]" target="_blank">[email protected]</a>></span><br> Date: Tue, Sep 30, 2008 at 3:47 PM<br>Subject: [nhibernate-issues] [JIRA] Updated: (NH-573) New method to "completely load" a proxy.<br>To: <a href="mailto:[email protected]" target="_blank">[email protected]</a><br> <br><br><br> [ <a href="http://jira.nhibernate.org/browse/NH-573?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel" target="_blank">http://jira.nhibernate.org/browse/NH-573?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel</a> ]<br> <br> Fabio Maulo updated NH-573:<br> ---------------------------<br> <br> Fix Version/s: (was: 2.1.0.Alpha1)<br> <br> > New method to "completely load" a proxy.<br> > ----------------------------------------<br> ><br> > Key: NH-573<br> > URL: <a href="http://jira.nhibernate.org/browse/NH-573" target="_blank">http://jira.nhibernate.org/browse/NH-573</a><br> > Project: NHibernate<br> > Issue Type: New Feature<br> > Components: Core<br> > Affects Versions: 1.0.2<br> > Reporter: Jerome Haltom<br> > Priority: Minor<br> ><br> > 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.<br> > 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.<br> > 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:<br> > session.Get(contract, "Client")<br> > 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.<br> > This method should also fix up any other references to the same instance in the entire session.<br> <br> --<br> This message is automatically generated by JIRA.<br> -<br> If you think it was sent incorrectly contact one of the administrators: <a href="http://jira.nhibernate.org/secure/Administrators.jspa" target="_blank">http://jira.nhibernate.org/secure/Administrators.jspa</a><br> -<br> For more information on JIRA, see: <a href="http://www.atlassian.com/software/jira" target="_blank">http://www.atlassian.com/software/jira</a><br> <br> <br> <br> -------------------------------------------------------------------------<br> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge<br> Build the coolest Linux based applications with Moblin SDK & win great prizes<br> Grand prize is a trip for two to an Open Source event anywhere in the world<br> <a href="http://moblin-contest.org/redirect.php?banner_id=100&url=/" target="_blank">http://moblin-contest.org/redirect.php?banner_id=100&url=/</a><br> _______________________________________________<br> nhibernate-issues mailing list<br> <a href="mailto:[email protected]" target="_blank">[email protected]</a><br> <a href="https://lists.sourceforge.net/lists/listinfo/nhibernate-issues" target="_blank">https://lists.sourceforge.net/lists/listinfo/nhibernate-issues</a><br> </div><br></div></div></div> </blockquote></div><br></div> ------=_Part_18359_11363147.1223152016950-- --===============7188301740463206196== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- 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=/ --===============7188301740463206196== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Nhibernate-development mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nhibernate-development --===============7188301740463206196==--