Details
-
New Feature
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
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
Attachments
1.
|
Lazy load support for Items | Closed | Gilles Bayon |