Multiple Resultset

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Multiple Resultset

Asaf Mesika
Hi,

I have a stored procedure (mySQL) which return mutliple resultset.
Does iBatis 2.3.x support (or any other version for that matter)?
If it does, what is the syntax?

I've tried using something like:

    <select id="getCustomers2"
resultMap="customerResultMap,keyValueResultMap">
        {CALL customer_getAll()}
    </select>

but I keep getting only a list of Customers which is only the
customerResultMap mapping.


Thanks!

Asaf
Reply | Threaded
Open this post in threaded view
|

Re: Multiple Resultset

Roger-2
I believe this is because iBatis thinks that the mysql driver does not
support multiple resultsets, which in turn is because
DatabaseMetaData.supportsMultipleResultSets() returns false for the
mysql driver.

I'm not sure why iBatis needs to call supportsMultipleResultSets()
though; can't it just check stmt.getMoreResults()?


On Oct 7, 8:37 am, Asaf Mesika <[hidden email]> wrote:

> Hi,
>
> I have a stored procedure (mySQL) which return mutliple resultset.
> Does iBatis 2.3.x support (or any other version for that matter)?
> If it does, what is the syntax?
>
> I've tried using something like:
>
>     <select id="getCustomers2"
> resultMap="customerResultMap,keyValueResultMap">
>         {CALL customer_getAll()}
>     </select>
>
> but I keep getting only a list of Customers which is only the
> customerResultMap mapping.
>
> Thanks!
>
> Asaf
Reply | Threaded
Open this post in threaded view
|

Re: Multiple Resultset

Roger Caplan
Ok, I submitted a bug to mysql; they're going to fix this in
Connector/J 5.1.14: http://bugs.mysql.com/bug.php?id=57380


On Sun, Oct 10, 2010 at 6:27 PM, Roger <[hidden email]> wrote:

> I believe this is because iBatis thinks that the mysql driver does not
> support multiple resultsets, which in turn is because
> DatabaseMetaData.supportsMultipleResultSets() returns false for the
> mysql driver.
>
> I'm not sure why iBatis needs to call supportsMultipleResultSets()
> though; can't it just check stmt.getMoreResults()?
>
>
> On Oct 7, 8:37 am, Asaf Mesika <[hidden email]> wrote:
>> Hi,
>>
>> I have a stored procedure (mySQL) which return mutliple resultset.
>> Does iBatis 2.3.x support (or any other version for that matter)?
>> If it does, what is the syntax?
>>
>> I've tried using something like:
>>
>>     <select id="getCustomers2"
>> resultMap="customerResultMap,keyValueResultMap">
>>         {CALL customer_getAll()}
>>     </select>
>>
>> but I keep getting only a list of Customers which is only the
>> customerResultMap mapping.
>>
>> Thanks!
>>
>> Asaf



--
-Roger