Uploaded image for project: 'iBatis for .NET'
  1. iBatis for .NET
  2. IBATISNET-232

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

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • DataMapper 1.6.1
    • DataMapper 1.6.2
    • DataMapper
    • None

    Description

      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.

      Attachments

        Activity

          People

            gilles Gilles Bayon
            ospyros Spyros Oikonomopoulos
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment