empire-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Francis De Brabandere <franci...@gmail.com>
Subject Re: getGeneratedKeys
Date Sun, 08 Feb 2009 14:03:20 GMT
seems postgresql does not support the return autogenerated keys :-s
The database operation failed. Native error is Returning autogenerated
keys is not supported..

so I implemented it the same way as the oracle driver but we have two
more options:
 * set the default for the column to nextval('<seqname>') and request
the value after insert using SELECT currval('<sequence-name>');
 * use the INSERT...RETURNING construction and handle the insert resultset:
   http://www.blahstuff.com/oldstuff/2007/02/22/611/postgresql-insert-returning/

the h2 and derby drivers are working correctly with the new code


On Sun, Feb 8, 2009 at 1:50 PM, Francis De Brabandere
<francisdb@gmail.com> wrote:
> I applied your changes on the maven branch as well as I'm working on
> the branch, but I'll submit the drivers to trunk when I'm done.
>
> I'm writing unit tests on the maven branch I think it's better if we
> all move to maven as soon as possible (otherwise it'll become very
> hard to merge stuff afterwards)
>
>
> On Sun, Feb 8, 2009 at 1:08 PM, Francis De Brabandere
> <francisdb@gmail.com> wrote:
>> Ok, will have a look at it later today
>>
>> On Sun, Feb 8, 2009 at 12:42 PM, Rainer Döbele <doebele@esteam.de> wrote:
>>> Hi Francis,
>>>
>>> I have checked in my modifications now to support getGeneratedKeys().
>>>
>>> You should be able just to remove the getPostInsertAutoIncValue() completely
and it should work.
>>>
>>> Please let me know if this works with your drivers.
>>>
>>> Regards
>>> Rainer
>>>
>>>
>>
>>
>>
>> --
>> http://www.somatik.be
>> Microsoft gives you windows, Linux gives you the whole house.
>>
>
>
>
> --
> http://www.somatik.be
> Microsoft gives you windows, Linux gives you the whole house.
>



-- 
http://www.somatik.be
Microsoft gives you windows, Linux gives you the whole house.

Mime
View raw message