Re: Insert into master table ->" 0 rows affected" -> Hibernate problems

Поиск
Список
Период
Сортировка
От
Тема Re: Insert into master table ->" 0 rows affected" -> Hibernate problems
Дата
Msg-id AEEF32D2527D6E4AB32DFD5125F1B2F8086504E3@maserati.eu.tieto.com
обсуждение исходный текст
Ответ на Re: Insert into master table ->" 0 rows affected" -> Hibernate problems  ("Scott Marlowe" <scott.marlowe@gmail.com>)
Ответы Re: Insert into master table ->" 0 rows affected" -> Hibernate problems  (Magnus Hagander <magnus@hagander.net>)
Список pgsql-general
Scott,
You're right, of course. I meant, is there a way to make Postgres return
the number of rows inserted to any child table _via_ the master table +
trigger function?
I have not been able to find a way to tell Hibernate to ignore the
returned number of rows, unless I insert via a custom insert statement.
/Mattias

-----Original Message-----
From: Scott Marlowe [mailto:scott.marlowe@gmail.com]
Sent: den 5 juni 2008 02:01
To: Arbin Mattias
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Insert into master table ->" 0 rows affected" ->
Hibernate problems

On Tue, Jun 3, 2008 at 7:38 AM,  <Mattias.Arbin@tietoenator.com> wrote:
> I have implemented partitioning using inheritance following the
> proposed solution here (using trigger):
> http://www.postgresql.org/docs/8.3/interactive/ddl-partitioning.html
>
> My problem is that when my Hibernate application inserts to the master

> table, postgres returns "0 rows affected", which causes Hibernate to
> throw an exception since it expects the returned row count to be equal

> to the number of rows inserted.
>
> Is there a solution to this, i.e. to get Postgres to return the
> correct number of rows inserted to the master table?

PostgreSQL IS reporting the correct number of rows inserted into the
master table.  0.

There's some setting in hibernate that will tell it to ignore that
returned number of rows, but I can't remember it right now.

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

Предыдущее
От: Bohdan Linda
Дата:
Сообщение: Re: nested view with outer joins - best practices
Следующее
От: Hermann Muster
Дата:
Сообщение: Re: Accessing other databases with DBLink when leaving user/password empty