ibatis-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Larry Meadors <larry.mead...@gmail.com>
Subject Missing resultClass and resultMap == no data returned
Date Thu, 02 Jun 2005 03:45:09 GMT
This is a heads-up and a question for folks.

I discovered last year that if you have a select element in your sql
map, and do not specify a resultMap or resultClass attribute that when
you execute that select statement, you get no error, no warning, and
no data. :-)

So here is the heads-up: If you are expecting data, but getting
nothing, check to see that you have defined a resultMap or

Now, here is the question: Is this a behavior that we should keep, or
should this cause an error? The reson I am asking is that when I
stumbled upon this one it came to my attention that some users use
select elements to run stored procedures (select doSomething() from
dual), and that by making a result-less select blow up, I would be
breaking applications. Doh!

I see 3 options:
1) Leave it as it is.
2) Fix it (and break other things).
3) Fix it with a sqlmapconfig setting, but leave it broken by default.

My vote is for #2.


View raw message