You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by "Gilles Bayon (JIRA)" <ib...@incubator.apache.org> on 2007/09/15 14:46:32 UTC

[jira] Closed: (IBATISNET-242) Cache error with QueryForObject

     [ https://issues.apache.org/jira/browse/IBATISNET-242?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gilles Bayon closed IBATISNET-242.
----------------------------------

    Resolution: Fixed

In SVN

> Cache error with QueryForObject<T> 
> -----------------------------------
>
>                 Key: IBATISNET-242
>                 URL: https://issues.apache.org/jira/browse/IBATISNET-242
>             Project: iBatis for .NET
>          Issue Type: Bug
>          Components: DataMapper
>    Affects Versions: DataMapper 1.6.1
>            Reporter: Gilles Bayon
>            Assignee: Gilles Bayon
>             Fix For: DataMapper 1.6.2
>
>
> Reported by Kenneth Olsen and patch by Christopher DeGuise
> User  _user = i.QueryForObject< User>( "stsGetOnEmail", email);
> When doing this, the error strikes:
> - I pass "1" as parameter in email, which will return NULL from db
> - I pass "1" again as parameter in email, which and the error pops up with: Unable to cast object of type 'System.Object' to type 'Domain.User'.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Closed: (IBATISNET-242) Cache error with QueryForObject

Posted by Gilles Bayon <ib...@gmail.com>.
Fix in SVN, I didn't remenber hy the original changes were made from the
first patch

-- 
Cheers,
Gilles

Re: [jira] Closed: (IBATISNET-242) Cache error with QueryForObject

Posted by Gilles Bayon <ib...@gmail.com>.
Thanks, I have added a unit test with the patch
All is in SVN.

On Dec 10, 2007 5:00 AM, Christopher DeGuise <
christopher.deguise@be-pragmatic.com> wrote:

> Another issue has been found with the translation of my original patch.
> QueryForQbject now calls the database every time regardless of the status of
> the cache. This one was not as obvious because my projects only use the
> generic method via code and the iBatis framework will use the non generic
> when calling statements from a result map. The patch is attached. I think we
> can put this one behind us now as I have been using the latest from svn with
> this patch in production for a while now.
>
> Thanks,
> Chris
>
>
> On 10/23/07, Christopher DeGuise <ch...@be-pragmatic.com>
> wrote:
> >
> > It appears that what was committed was a variation based on the original
> > patch. Using the latest code from trunk QueryForObject<T> now calls to the
> > database for every call regardless of prior caching. I have attached another
> > patch that addresses this. Let me know if this is still not right. I was a
> > bit curious on why the original changes were made from the first patch.
> >
> > Thanks,
> > Chris
> >
> > On 9/15/07, Gilles Bayon (JIRA) < ibatis-dev@incubator.apache.org>
> > wrote:
> > >
> > >
> > >      [
> > > https://issues.apache.org/jira/browse/IBATISNET-242?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel]
> > >
> > > Gilles Bayon closed IBATISNET-242.
> > > ----------------------------------
> > >
> > >     Resolution: Fixed
> > >
> > > In SVN
> > >
> > > > Cache error with QueryForObject<T>
> > > > -----------------------------------
> > > >
> > > >                 Key: IBATISNET-242
> > > >                 URL:
> > > https://issues.apache.org/jira/browse/IBATISNET-242
> > > >             Project: iBatis for .NET
> > > >          Issue Type: Bug
> > > >          Components: DataMapper
> > > >    Affects Versions: DataMapper 1.6.1
> > > >            Reporter: Gilles Bayon
> > > >            Assignee: Gilles Bayon
> > > >             Fix For: DataMapper 1.6.2
> > > >
> > > >
> > > > Reported by Kenneth Olsen and patch by Christopher DeGuise
> > > > User  _user = i.QueryForObject< User>( "stsGetOnEmail", email);
> > > > When doing this, the error strikes:
> > > > - I pass "1" as parameter in email, which will return NULL from db
> > > > - I pass "1" again as parameter in email, which and the error pops
> > > up with: Unable to cast object of type ' System.Object' to type '
> > > Domain.User'.
> > >
> > > --
> > > This message is automatically generated by JIRA.
> > > -
> > > You can reply to this email to add a comment to the issue online.
> > >
> > >
> >
> >


-- 
Cheers,
Gilles

Join my network on LinkedIn
http://www.linkedin.com/in/sellig

Re: [jira] Closed: (IBATISNET-242) Cache error with QueryForObject

Posted by Christopher DeGuise <ch...@be-pragmatic.com>.
Another issue has been found with the translation of my original patch.
QueryForQbject now calls the database every time regardless of the status of
the cache. This one was not as obvious because my projects only use the
generic method via code and the iBatis framework will use the non generic
when calling statements from a result map. The patch is attached. I think we
can put this one behind us now as I have been using the latest from svn with
this patch in production for a while now.

Thanks,
Chris<file://///greenmountain/c$/depot/ibatis.trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/CachingStatement.cs>

On 10/23/07, Christopher DeGuise <ch...@be-pragmatic.com>
wrote:
>
> It appears that what was committed was a variation based on the original
> patch. Using the latest code from trunk QueryForObject<T> now calls to the
> database for every call regardless of prior caching. I have attached another
> patch that addresses this. Let me know if this is still not right. I was a
> bit curious on why the original changes were made from the first patch.
>
> Thanks,
> Chris
>
> On 9/15/07, Gilles Bayon (JIRA) <ib...@incubator.apache.org> wrote:
> >
> >
> >      [
> > https://issues.apache.org/jira/browse/IBATISNET-242?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel]
> >
> > Gilles Bayon closed IBATISNET-242.
> > ----------------------------------
> >
> >     Resolution: Fixed
> >
> > In SVN
> >
> > > Cache error with QueryForObject<T>
> > > -----------------------------------
> > >
> > >                 Key: IBATISNET-242
> > >                 URL:
> > https://issues.apache.org/jira/browse/IBATISNET-242
> > >             Project: iBatis for .NET
> > >          Issue Type: Bug
> > >          Components: DataMapper
> > >    Affects Versions: DataMapper 1.6.1
> > >            Reporter: Gilles Bayon
> > >            Assignee: Gilles Bayon
> > >             Fix For: DataMapper 1.6.2
> > >
> > >
> > > Reported by Kenneth Olsen and patch by Christopher DeGuise
> > > User  _user = i.QueryForObject< User>( "stsGetOnEmail", email);
> > > When doing this, the error strikes:
> > > - I pass "1" as parameter in email, which will return NULL from db
> > > - I pass "1" again as parameter in email, which and the error pops up
> > with: Unable to cast object of type ' System.Object' to type '
> > Domain.User'.
> >
> > --
> > This message is automatically generated by JIRA.
> > -
> > You can reply to this email to add a comment to the issue online.
> >
> >
>
>

Re: [jira] Closed: (IBATISNET-242) Cache error with QueryForObject

Posted by Christopher DeGuise <ch...@be-pragmatic.com>.
It appears that what was committed was a variation based on the original
patch. Using the latest code from trunk QueryForObject<T> now calls to the
database for every call regardless of prior caching. I have attached another
patch that addresses this. Let me know if this is still not right. I was a
bit curious on why the original changes were made from the first patch.

Thanks,
Chris

On 9/15/07, Gilles Bayon (JIRA) <ib...@incubator.apache.org> wrote:
>
>
>      [
> https://issues.apache.org/jira/browse/IBATISNET-242?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel]
>
> Gilles Bayon closed IBATISNET-242.
> ----------------------------------
>
>     Resolution: Fixed
>
> In SVN
>
> > Cache error with QueryForObject<T>
> > -----------------------------------
> >
> >                 Key: IBATISNET-242
> >                 URL: https://issues.apache.org/jira/browse/IBATISNET-242
> >             Project: iBatis for .NET
> >          Issue Type: Bug
> >          Components: DataMapper
> >    Affects Versions: DataMapper 1.6.1
> >            Reporter: Gilles Bayon
> >            Assignee: Gilles Bayon
> >             Fix For: DataMapper 1.6.2
> >
> >
> > Reported by Kenneth Olsen and patch by Christopher DeGuise
> > User  _user = i.QueryForObject< User>( "stsGetOnEmail", email);
> > When doing this, the error strikes:
> > - I pass "1" as parameter in email, which will return NULL from db
> > - I pass "1" again as parameter in email, which and the error pops up
> with: Unable to cast object of type 'System.Object' to type 'Domain.User'.
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>