ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Bibb <richard.b...@aimhedge.com>
Subject Returning Three ArrayLists
Date Thu, 20 Aug 2009 07:51:04 GMT

I think I'm probably trying to use iBatis in a way that goes against it's
design, but for what I need to do it's correct.

If I have a query like:

select Number1, Number2, Number3

Assume that the query returns many rows, 

I would like to be able to return this data as three ArrayList<Double>. I
know I can return one ArrayList<SomeClass> where SomeClass contains three
numbers but that just adds a second layer of processing that I don't want to
do. I also know I could do three separate queries but as some of the numbers
may not have entries on some days it would again add a layer of processing
to add null data back into the ArrayLists returned

I tried doing a result map containing three collections but the data
returned was wrong (all of the collections seemed to get populated with data
from the first row). 
View this message in context: http://www.nabble.com/Returning-Three-ArrayLists-tp25057560p25057560.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.

To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org

View raw message