ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daan de Wit" <d.de....@wis.nl>
Subject select statement without resultmap
Date Wed, 04 Jan 2006 16:18:15 GMT
Hi,

 

Today I found myself stuck with a very weird problem. A queryForList
returned an empty list while executing exactly the same query in the SQL
Query Analyzer returned one result. I thought that maybe the SQL
Profiler would be more informative about the problem, but query and the
parameter were both the same as I used in the Query Analayzer.

It turned out that I forgot to set a resultmap for the select-statement.
Wouldn't it be better to throw an exception if no resultmap or
resultclass is found for a select? Or maybe the xml could be changed to
something like this:

<select id="mySelect" resultType="map" resultId="myResultMap">

I realize that the names I chose for the attributes are not that good,
but they are good enough to get the idea.

 

Regards,

Daan


Mime
View raw message