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

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: Mattias(dot)Arbin(at)tietoenator(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Insert into master table ->" 0 rows affected" -> Hibernate problems
Date: 2008-06-05 00:00:44
Message-ID: dcc563d10806041700r36a27a65n3b22e182669d654d@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Jun 3, 2008 at 7:38 AM, <Mattias(dot)Arbin(at)tietoenator(dot)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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ralph Smith 2008-06-05 00:02:49 Re: Script errors on run
Previous Message Scott Marlowe 2008-06-04 23:53:38 Re: full vacuum really slows down query