ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Semturs <Christopher.Semt...@objentis.com>
Subject Lazy loading not working - why?
Date Sun, 10 Apr 2005 22:33:08 GMT
Hello,

I'm having a project here using iBATIS and to to use lazy loading + 
bytecode enhancements, but it does not work. It works for other projects, 
and certainly there's some fault on my side. However, I just cannot check 
out what's the problem here.
The situation in detail:

SQL-Map-Config enabling both bytecode-enhancement and lazy loading
   <settings
        cacheModelsEnabled="true"
        enhancementEnabled="true"
        lazyLoadingEnabled="true"
        maxRequests="32"
        maxSessions="10"
        maxTransactions="5"
        useStatementNamespaces="false"
    />

Some query, and a resultmap

    <resultMap id="fillKPI" class="TBL_KPI">
        <result property="id" column="id"/>
        <result property="refobject" column="refid" 
select="getRefObject"/>
    </resultMap>

    <select id="getKPI" resultMap="fillKPI">
           SELECT
        id,
        refId
              FROM
                  tbl_one
   </select>


The second query ("getRefObject") is executed even when not accessing the 
property.
In addition, bytecode-enhancement is not applied. The values are all 
fetched from the database even when only accessing the first object.
I have no clue about this. If you can give me any hints on how to trace 
this problem, I'd be glad.


Best Regards,
Christopher 


Mime
View raw message