ibatis-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nathan Maves <Nathan.Ma...@Sun.COM>
Subject Re: select statement without resultmap
Date Wed, 04 Jan 2006 16:31:09 GMT
Is there any reason that either (resultMap | resultClass) are not  
required by the dtd for a sqlmap file?


On Jan 4, 2006, at 9:18 AM, Daan de Wit wrote:

> 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

View raw message