You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Hugh Ross <hh...@gmail.com> on 2009/01/06 22:42:01 UTC

N+1 Selects Outer Join Null Handling Question

We are testing some sqlMaps to avoid the N+1 Selects problem that include
OUTER JOINs.  Since nulls are coming back in the Result Sets, we are seeing
pojos created with all nulls.  Testing with iBatis 2.3.4.

I don't recall seeing this problem mentioned before, but I can't believe no
one else has hit it -- any suggestions for avoiding the null pojo objects
(other than deleting them after creation)?

Thanks...

Re: N+1 Selects Outer Join Null Handling Question

Posted by Hugh Ross <hh...@gmail.com>.
Excellent.  Thank you both!

On Tue, Jan 6, 2009 at 7:04 PM, Guilherme Luis Bradasch <gu...@gmail.com>wrote:

> I had the same issue, and it's fixed in the latest version of iBatis.
> You just need to add a "notNullColumn=true" to the resultMap.
>
> On Tue, Jan 6, 2009 at 8:01 PM, Jeff Butler <je...@gmail.com> wrote:
> > See here:
> >
> > http://issues.apache.org/jira/browse/IBATIS-375
> >
> > Looks like a fix for this is in 2.3.4.
> >
> > Jeff butler
> >
> >
> > On Tue, Jan 6, 2009 at 3:42 PM, Hugh Ross <hh...@gmail.com> wrote:
> >>
> >> We are testing some sqlMaps to avoid the N+1 Selects problem that
> include
> >> OUTER JOINs.  Since nulls are coming back in the Result Sets, we are
> seeing
> >> pojos created with all nulls.  Testing with iBatis 2.3.4.
> >>
> >> I don't recall seeing this problem mentioned before, but I can't believe
> no
> >> one else has hit it -- any suggestions for avoiding the null pojo
> objects
> >> (other than deleting them after creation)?
> >>
> >> Thanks...
> >
>

Re: N+1 Selects Outer Join Null Handling Question

Posted by Guilherme Luis Bradasch <gu...@gmail.com>.
I had the same issue, and it's fixed in the latest version of iBatis.
You just need to add a "notNullColumn=true" to the resultMap.

On Tue, Jan 6, 2009 at 8:01 PM, Jeff Butler <je...@gmail.com> wrote:
> See here:
>
> http://issues.apache.org/jira/browse/IBATIS-375
>
> Looks like a fix for this is in 2.3.4.
>
> Jeff butler
>
>
> On Tue, Jan 6, 2009 at 3:42 PM, Hugh Ross <hh...@gmail.com> wrote:
>>
>> We are testing some sqlMaps to avoid the N+1 Selects problem that include
>> OUTER JOINs.  Since nulls are coming back in the Result Sets, we are seeing
>> pojos created with all nulls.  Testing with iBatis 2.3.4.
>>
>> I don't recall seeing this problem mentioned before, but I can't believe no
>> one else has hit it -- any suggestions for avoiding the null pojo objects
>> (other than deleting them after creation)?
>>
>> Thanks...
>

Re: N+1 Selects Outer Join Null Handling Question

Posted by Jeff Butler <je...@gmail.com>.
See here:

http://issues.apache.org/jira/browse/IBATIS-375

Looks like a fix for this is in 2.3.4.

Jeff butler


On Tue, Jan 6, 2009 at 3:42 PM, Hugh Ross <hh...@gmail.com> wrote:
>
> We are testing some sqlMaps to avoid the N+1 Selects problem that include
> OUTER JOINs.  Since nulls are coming back in the Result Sets, we are seeing
> pojos created with all nulls.  Testing with iBatis 2.3.4.
>
> I don't recall seeing this problem mentioned before, but I can't believe no
> one else has hit it -- any suggestions for avoiding the null pojo objects
> (other than deleting them after creation)?
>
> Thanks...