Re: Hibernate, web application and only one sequence for all primary keys - Mailing list pgsql-sql

From Craig Ringer
Subject Re: Hibernate, web application and only one sequence for all primary keys
Date
Msg-id 4AB2E9FE.9080006@postnewspapers.com.au
Whole thread Raw
In response to Re: Hibernate, web application and only one sequence for all primary keys  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-sql
Tom Lane wrote:
> rawi <only4com@web.de> writes:
>> Grails/Hibernate wishes per default one sequence for all tables-PKs and all
>> PKs as BigInt.
> 
> Redesign that software; this is fundamentally broken and stupid.

It's a pretty silly default, but it's clearly intended for simple /
small databases. In any real database you'll be using one sequence per
generated PK. I've had no problems with this with Hibernate, and am a
bit puzzled that the OP is trying to fit their DB to Hibernate rather
than doing the trivial configuration required to get Hibernate to fit
the DB.

The Hibernate documentation is pretty good, and covers this sort of
thing well.

--
Craig Ringer


pgsql-sql by date:

Previous
From: Frank Bax
Date:
Subject: Re: extracting from epoch values in pgsql
Next
From: Adrian Klaver
Date:
Subject: Re: Rules, functions and RETURNING