Hi

I'm having problems with the caching in iBatis. I'm running ibatis-2.3.0.677
with an Oracle 10g database. Basically if I remove a row in the DB through
iSQL*Plus, it is still present in the iBatis cache. Here's my
sqlMapConfig.xml:

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE sqlMapConfig
        PUBLIC "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN"
        "http://ibatis.apache.org/dtd/sql-map-config-2.dtd";>

<sqlMapConfig>
        <settings cacheModelsEnabled="false" />
        <sqlMap resource="core/Test.xml" />
</sqlMapConfig>

Test.xml:

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE sqlMap
        PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN"
        "http://ibatis.apache.org/dtd/sql-map-2.dtd";>

<sqlMap>
        <typeAlias type="fi.eficode.lila.core.Test" alias="Test" />
        
        <resultMap id="testResult" class="Test">
                <result property="id" column="Id" />
                <result property="name" column="Name" />
        </resultMap>
        
        
        <select id="getAllTests" resultMap="testResult">
                select * from Test
        </select>

        <insert id="insertTest" parameterClass="Test">
                INSERT INTO TEST
                VALUES (#id#, #name#)
        </insert>
</sqlMap>


When i run the insert query everything happens as expected and a row appears
in the table 'TEST' and also appears when i run the select query in Java.
Now if i delete the row through iSQL*Plus and run the select in Java again,
I still get the test object as a result. This happens even though I've
deleted the row, turned caching off in iBatis and even tried to call
SqlMapClient().flushDataCache().

What gives?
-- 
View this message in context: 
http://www.nabble.com/Weird-cache-behaviour-in-iBatis-tp14875443p14875443.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.

Reply via email to