Not Yet Documented
The following features have yet to be documented. Feel free to make a wiki page for any of them and document them here. Good documentation will be promoted to the official Developer Guide.
JDBC logging issues (iBATIS DataMapper)
Lazy loading issues (iBATIS DataMapper)
remapResults="true" (iBATIS DataMapper)
Does anyone know where this is documentation for that first item (Multiple result set support)?
I have scoured the internet and read every blog/forum post on using multiple result sets, but I cannot see how to get this to work.
I'm using MySQL and I have a mapped select statement with two selects running in sequence. The first uses SQL_CALC_FOUND_ROWS to store the total rows and the second does select FOUND_ROWS(); to return the total. This is typical in MySQL when paging through large data sets.
I have everything mapped correctly I think. My resultMap is resultMap="RowResult,int" and my mapper instance loads it fine. But I can't, for the life of me, figure out how to query out the right objects. Using QueryForList<T> works fine and retrieves the first result perfectly. But I can't find or figure out how to also extract the second (int) result for the FOUND_ROWS() value.
Posted by email@example.com at Nov 29, 2008 10:01
Figured out one way of doing it - you can return QueryForList as an ArrayList and loop through it. The second result, an integer, is stuffed into the ArrayList after the other objects. Not as clean and intiutive as I would have imagined, but NO complaining here! Glad to have a solution.
Posted by firstname.lastname@example.org at Dec 03, 2008 12:49