[
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.