pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Craig Ringer <craig@postnewspapers.com.au>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: rawi <only4com@web.de>
Cc: pgsql-sql@postgresql.org
Subject: Re: Hibernate, web application and only one sequence for all primary keys
Date: Fri, 18 Sep 2009 10:01:34 +0800
Message-ID: <4AB2E9FE.9080006@postnewspapers.com.au> (raw)
In-Reply-To: <10006.1253195969@sss.pgh.pa.us>
References: <25490498.post@talk.nabble.com>
	<10006.1253195969@sss.pgh.pa.us>

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



view thread (12+ messages)  latest in thread

Message-ID: <4AB2E9FE.9080006@postnewspapers.com.au>
Permalink:  ../4AB2E9FE.9080006@postnewspapers.com.au/
Also on:    postgresql.org/message-id/4AB2E9FE.9080006@postnewspapers.com.au

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: craig@postnewspapers.com.au, tgl@sss.pgh.pa.us, only4com@web.de
  Subject: Re: Hibernate, web application and only one sequence for all primary keys
  In-Reply-To: <4AB2E9FE.9080006@postnewspapers.com.au>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox