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

Lazy load support for Strong typed collections and single Items

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • DataMapper 1.5
    • DataMapper, Testing
    • None

    Description

      Nowadays Ibatis only support lazy load for no typed (IList) collections and can not lazy load relationship of 0 or 1.

      Changes:

      • In IBatisNet.DataMapper.Test.NUnit.SqlMapTests.ResultMapTest .TestLazyWithStronglyTypedCollectionMapping()
        exist one test that end ok but its outdated and it should fail.
      • BatisNet.DataMapper.Test.Domain.Order
        Ln 22:
        Original:
        private IList _lineItems;//LineItemCollection
        Correct:
        private LineItemCollection _lineItems;

      Ln: 50
      Original:
      public IList LineItems
      Correct:
      public LineItemCollection LineItems

      {...}

      In the statment order-with-lines-collection add to LazyLoad = "true"

      <resultMap id="order-with-lines-collection" class="Order" extends="lite-order-result-by-name" >
      <result property="LineItems" column="Order_ID" select="GetLineItemsForOrderWithListClass" lazyLoad="true"/>
      </resultMap>

      -TODO add test for 0...1 relationship , ej Worker.Boss

      Attached its the files changed to implement "beta" this feature

      Attachments

        1. LazyLoad_rev04.zip
          7 kB
          David Marzo
        2. LazyLoad_rev05.zip
          7 kB
          David Marzo
        3. LazyLoad_rev06.zip
          7 kB
          David Marzo

        Activity

          People

            gilles Gilles Bayon
            d.marzo David Marzo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: