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

In nested mappings property with GroupBy strategy must be collection

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • DataMapper 1.6.2, DataMapper 3.0
    • None
    • DataMapper
    • 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

      Attachments

        Activity

          People

            Unassigned Unassigned
            filin Vasiliy Lukin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: