You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by "Oikonomopoulos Spyros (JIRA)" <ib...@incubator.apache.org> on 2007/07/19 09:44:05 UTC

[jira] Created: (IBATISNET-232) Nested left joins with group by cause NPE when two subsequent levels have null values

Nested left joins with group by cause NPE when two subsequent levels have null values
-------------------------------------------------------------------------------------

                 Key: IBATISNET-232
                 URL: https://issues.apache.org/jira/browse/IBATISNET-232
             Project: iBatis for .NET
          Issue Type: Bug
          Components: DataMapper
    Affects Versions: DataMapper 1.6.1
            Reporter: Oikonomopoulos Spyros
         Attachments: DataMapper.MappedStatements.PropertStrategy.GroupByStrategy.patch

Region (region_id, name) values: (1, 'reg1') (2, 'reg2')
State (state_id, region_id, name) values: (1, 1, 'state1')
City (city_id, region_id, state_id, name) values (1,1,1,'city1')

A nested group with left joins will create the following rows:

1 reg1 --- 1 1 state 1 --- 1 1 1 city1
2 reg2 --- null --- null

Now during construction of the object hierarchy iBatis, for the second row  tries to set the "cities" collection of the state object, which unfortunately is null, so an NPE is raised.

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


[jira] Closed: (IBATISNET-232) Nested left joins with group by cause NPE when two subsequent levels have null values

Posted by "Gilles Bayon (JIRA)" <ib...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/IBATISNET-232?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gilles Bayon closed IBATISNET-232.
----------------------------------

       Resolution: Fixed
    Fix Version/s: DataMapper 1.6.2
         Assignee: Gilles Bayon

Patch apply 
Thanks
In SVN

> Nested left joins with group by cause NPE when two subsequent levels have null values
> -------------------------------------------------------------------------------------
>
>                 Key: IBATISNET-232
>                 URL: https://issues.apache.org/jira/browse/IBATISNET-232
>             Project: iBatis for .NET
>          Issue Type: Bug
>          Components: DataMapper
>    Affects Versions: DataMapper 1.6.1
>            Reporter: Spyros Oikonomopoulos
>            Assignee: Gilles Bayon
>             Fix For: DataMapper 1.6.2
>
>         Attachments: DataMapper.MappedStatements.PropertStrategy.GroupByStrategy.patch
>
>
> Region (region_id, name) values: (1, 'reg1') (2, 'reg2')
> State (state_id, region_id, name) values: (1, 1, 'state1')
> City (city_id, region_id, state_id, name) values (1,1,1,'city1')
> A nested group with left joins will create the following rows:
> 1 reg1 --- 1 1 state 1 --- 1 1 1 city1
> 2 reg2 --- null --- null
> Now during construction of the object hierarchy iBatis, for the second row  tries to set the "cities" collection of the state object, which unfortunately is null, so an NPE is raised.

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


[jira] Commented: (IBATISNET-232) Nested left joins with group by cause NPE when two subsequent levels have null values

Posted by "Nicholas Piasecki (JIRA)" <ib...@incubator.apache.org>.
    [ https://issues.apache.org/jira/browse/IBATISNET-232?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12521094 ] 

Nicholas Piasecki commented on IBATISNET-232:
---------------------------------------------

I too have experienced this error in DataMapper 1.6.1; it's very confusing.

Oikonomopoulos Spyros' patch did indeed resolve the problem for me as well. Thank you.

> Nested left joins with group by cause NPE when two subsequent levels have null values
> -------------------------------------------------------------------------------------
>
>                 Key: IBATISNET-232
>                 URL: https://issues.apache.org/jira/browse/IBATISNET-232
>             Project: iBatis for .NET
>          Issue Type: Bug
>          Components: DataMapper
>    Affects Versions: DataMapper 1.6.1
>            Reporter: Oikonomopoulos Spyros
>         Attachments: DataMapper.MappedStatements.PropertStrategy.GroupByStrategy.patch
>
>
> Region (region_id, name) values: (1, 'reg1') (2, 'reg2')
> State (state_id, region_id, name) values: (1, 1, 'state1')
> City (city_id, region_id, state_id, name) values (1,1,1,'city1')
> A nested group with left joins will create the following rows:
> 1 reg1 --- 1 1 state 1 --- 1 1 1 city1
> 2 reg2 --- null --- null
> Now during construction of the object hierarchy iBatis, for the second row  tries to set the "cities" collection of the state object, which unfortunately is null, so an NPE is raised.

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