Re: Error while retrieving generated keys

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: Error while retrieving generated keys
Дата
Msg-id 45F1D1F6.3070802@enterprisedb.com
обсуждение исходный текст
Ответ на Re: Error while retrieving generated keys  ("Gary Greenberg" <gary@icontrol.com>)
Список pgsql-jdbc
Gary Greenberg wrote:
> I don't know about an easy workaround. Especially while using frameworks.

There's plenty of options, for example calling lastval, or using INSERT
RETURNING, or stored procedures. With frameworks, I'm sure you can
usually work-around by configuring the framework properly. A little bit
of googling tells me that you might be able to set
hibernate.jdbc.use_get_generated_keys to false, though not being a
Hibernate user myself I have no idea where to put that.

In any case, it would help a lot if you could write a FAQ entry of
paragraph or two when you find a solution.

>  > I am really disappointed that PostgreSQL is becoming a fossil.
>
> ;-) Now you're exaggerating.
>
> Am I? Who, in his right mind will go back from using JPA or Hibernate to
> plain old JDBC calls?
>
> Should we go to managing transactions manually, OR mapping, etc?

The lack of one fairly new JDBC API call hardly makes the whole database
management system a fossil, that's what I'm saying.

> Ken Johanson posted a preliminary patch in February, but there was a
>
> bunch of issues with it. This is an open source project, so if you'd
>
> like to see it happen, patches are more than welcome.
>
> I can look up at this patch and see if I can contribute to fix it.
> Unfortunately I am on tight project schedule.
>
> How do I download the patch, though?

See the archives for the patch and discussion:

http://archives.postgresql.org/pgsql-jdbc/2007-02/msg00074.php

--
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: "Gary Greenberg"
Дата:
Сообщение: Re: Error while retrieving generated keys
Следующее
От: "Mike Clements"
Дата:
Сообщение: Re: Error while retrieving generated keys