Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Postgresql with Hibernate issues


  • From: "xuemei" <xgan(at)ubitech(dot)com>
  • To: <pgsql-general(at)postgresql(dot)org>
  • Subject: Postgresql with Hibernate issues
  • Date: Thu, 25 May 2006 16:09:22 -0000
  • Message-id: <20060524154615(dot)2C92E9F9F8F(at)postgresql(dot)org>

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



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group