Re: Postgresql with Hibernate issues

From: Bjørn T Johansen <btj(at)havleik(dot)no>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Postgresql with Hibernate issues
Date: 2006-05-25 11:45:50
Message-ID: 20060525134550.03864549@pennywise
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

How does your hibernate mapping look like? Especially your generator tag...

BTJ

On Thu, 25 May 2006 16:09:22 -0000
"xuemei" <xgan(at)ubitech(dot)com> wrote:

> Hello:
>
>
>
> I have a java application that starts several processes to retrieve data and
> store them into the database tables;
>
> When I run this on winXP and with Hibernate/Mysql, everything looks ok.
>
> Now I need to use postgresql, so I change the hibernate configuration file.
>
> When I run the program, the tables are created and records inserted into
> several tables.
>
> But the ID for each table are all wrong.
>
>
>
> A closer look indicates that the hibernate is using the select nextval for
> each insert command, which results in the
>
> ID for each table is considered as a global one,
>
>
>
> Tables ID
>
> table1 1 , 5
>
> table2 2,3,4
>
> table3 6
>
> table4 7,8
>
> table1 9 ,10
>
>
>
> Why this is happening, does this mean Hibernate with postgresql can not
> work?, whileas same application+ Hibernate with mysql
>
> Works perfectly fine?
>
>
>
> Thanks a lot for your advices.
>
>
>
> Shemy
>

--
-----------------------------------------------------------------------------------------------
Bjørn T Johansen

btj(at)havleik(dot)no
-----------------------------------------------------------------------------------------------
Someone wrote:
"I understand that if you play a Windows CD backwards you hear strange Satanic messages"
To which someone replied:
"It's even worse than that; play it forwards and it installs Windows"
-----------------------------------------------------------------------------------------------

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Kenneth Downs 2006-05-25 11:48:10 Re: 8.1 on gentoo
Previous Message Dave Page 2006-05-25 10:51:27 Attn: Richard Huxton