On 19 March 2011 11:49, Lew <noone@lewscanon.com> wrote:
> Sean Bowman wrote:
>>
>> Thanks for the quick response. I'll switch it around to execute() each
>> prepared statement individually, and accumulate the generated ID's [sic].
>
> Why don't you try it batched without the RETURNING clause, and use
> 'getGeneratedKeys()' as the docs suggest?
There *is* no RETURNING clause in the application's original query
(see the code in the OP), that clause is being added by the driver to
implement Statement.RETURN_GENERATED_KEYS.
Merely requesting generated keys shouldn't really make executeBatch()
explode like this - the app is executing bare INSERTs as far as it
knows. We could definitely do better here.
Oliver