ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Clinton Begin" <clinton.be...@gmail.com>
Subject RE: Weird cache behaviour in iBatis
Date Wed, 16 Jan 2008 15:34:39 GMT

iBATIS doesn't cache anything by default.  Since you have no caching
configured, there must be some other explanation.  


-----Original Message-----
From: JohannesK [mailto:johannes.kuusela@eficode.fi] 
Sent: January-16-08 2:20 AM
To: user-java@ibatis.apache.org
Subject: Weird cache behaviour in iBatis


I'm having problems with the caching in iBatis. I'm running ibatis-
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

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE sqlMapConfig
	PUBLIC "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN"

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


<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE sqlMap
	PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN"

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

	<insert id="insertTest" parameterClass="Test">
		VALUES (#id#, #name#)

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

What gives?
View this message in context:
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.

View raw message