ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aladin <iba...@aladin.ca>
Subject Problems with displaying contents of table
Date Sat, 07 Jan 2006 19:25:28 GMT
Hello,

I've just run into a problem and cannot find a solution - please read an 
ask for explanation if anything is not clear:

SETUP:
======
* I have a table XXX with columns a & b
* I have a query which displays the contents of XXX
* I have a query which alters (ADD or DROP) the columns of XXX
* Each query is in an sql-map (under different keys)
* In sql-map-config all caching is turned off
Queries:
<update id="alterTable">ALTER TABLE $tableName$ $columns$</update>
<select id="select" resultClass="app.SearchResultObject">SELECT * FROM 
$tableName$</select>

PROBLEM:
========
1) User calls the query which displays XXX successfully on the screen
2) User calls the query which DROPs column b from table XXX
3) User calls the query which displays XXX on the screen and ERROR occurs:

javax.servlet.ServletException: 
com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in /db/sql/surveys.xml.
--- The error occurred while applying a result map.
--- Check the getSurveyResults-AutoResultMap.
--- Check the result mapping for the 'b' property.
--- Cause: java.sql.SQLException: Column 'b' not found.
Caused by: java.sql.SQLException: Column 'b' not found.

Thanks
Aladin

Mime
View raw message