Hi X,
That's not really lazy loading, it's dynamic conditional loading but I guess
it will do for the same thing.
According to page 7 and 9 of the same doc,
<settings
cacheModelsEnabled="true"
enhancementEnabled="true"
lazyLoadingEnabled="true"
maxRequests="128"
maxSessions="10"
maxTransactions="5"
useStatementNamespaces="false"
/>
lazyLoadingEnabled is 'true' by default, exactly how does this lazy loading
work?
The doc seems to lack in this. For example,
<resultMap id="get-category-result" class="com.ibatis.example.Category">
<result property="id" column="CAT_ID"/>
<result property="description" column="CAT_DESCRIPTION"/>
<result property="productList" column="CAT_ID" select="
getProductsByCatId"/>
</resultMap>
.......
<statement id="getProductsByCatId" parameterClass="int"
resultMap="get-product-result">
select * from PRODUCT where PRD_CAT_ID = #value#
</statement>
Now if productList contains 10000 products, does resultMap
'get-category-result' load
productList by lazy loading when called??
Or under what condition, does default lazyLoadingEnabled='true' work?
Thanks,
----- Original Message -----
From: "xianwinwin" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, June 15, 2006 2:52 PM
Subject: Re: lazy loading
hi there, i just had the same problem and i found it in the tutorial at:
http://people.apache.org/dist/ibatis/ibatis.java/docs/iBATIS-SqlMaps-2.pdf
page 36
hope this helps
--
View this message in context:
http://www.nabble.com/lazy-loading-t1789831.html#a4876489
Sent from the iBATIS - User - Java forum at Nabble.com.