I'm using iBatis 2.3.0 and I'm having some issues with the Lazy Loading. It seems that several of my objects which should be lazy loaded are actually getting loaded when nothing is accessing the object. The SQL select statements are simply getting fired when the parent object is loaded. I've looked at the objects being assigned and they are indeed the loaded. Here is the print out of the variable being assigned.
CGLIB$CALLBACK_0 EnhancedLazyResultLoader$EnhancedLazyResultLoaderImpl (id=316)
client SqlMapClientImpl (id=321)
loaded true
parameterObject "1376771"
resultObject RequestOrder (id=329)
statementName "RequestOrder.findByPrimaryKey"
targetType Class<T> (com.sybase.it.cosmos.domain.RequestOrder) (id=310)
As you can see the object has been loaded. Is there a way that I can control when these objects are loaded and when they are not? Is there a way that I can log what is transpiring to cause these objects to be loaded?
Here is my sql-map-config entry for lazy loading.
<settings cacheModelsEnabled="false" errorTracingEnabled="false"
enhancementEnabled="true" lazyLoadingEnabled="true" maxSessions="250"
maxTransactions="30" maxRequests="500" useStatementNamespaces="true" />
Thanks for the help...
- Mapping sqlMap to java.util.Properties Warren
- Re: Mapping sqlMap to java.util.Properties Larry Meadors
- Re: Mapping sqlMap to java.util.Propertie... Warren
- How to control Lazy Loading Christopher . Mathrusse
