iBatis for .NET
  1. iBatis for .NET
  2. IBATISNET-300

In nested mappings property with GroupBy strategy must be collection

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: DataMapper 1.6.2, DataMapper 3.0
    • Fix Version/s: None
    • Component/s: DataMapper
    • Labels:
      None

      Description

      public class LineItem

      { public int Id }

      public class Product

      { public int Id public IList Items }

      class Category

      { public int Id; public Product Product; //this property is not a IList! }

      <resultMap id="Item-Result" class="Item">
      <result property="Id" column="Item_Id" />
      <result property="UnitCost" column="Item_UnitCost" />
      <result property="Status" column="Item_Status" />
      </resultMap>

      <resultMap id="Product-Result" class="Product" groupBy="Id">
      <result property="Id" column="Product_Id"/>
      <result property="Name" column="Product_Name"/>
      <result property="Items" resultMapping="GroupByMapping.Item-Result"/>
      </resultMap>

      <resultMap id="Category-Result-One-Product" class="Category" groupBy="Id">
      <result property="Id" column="Category_Id"/>
      <result property="Name" column="Category_Name"/>
      <result property="Product" resultMapping="GroupByMapping.Product-Result"/>
      </resultMap>

      in file IBatisNet.DataMapper.MappedStatements.PropertStrategy.GroupByStrategy throws NullReferenceException

        Activity

        Vasiliy Lukin created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Vasiliy Lukin
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development