Re: Hibernate, web application and only one sequence for all primary keys

From: Lew <noone(at)lwsc(dot)ehost-services(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Hibernate, web application and only one sequence for all primary keys
Date: 2009-09-19 02:38:07
Message-ID: h91g6g$3la$1@news.albasani.net
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-sql

rawi wrote:
> Grails/Hibernate wishes per default one sequence for all tables-PKs and all
> PKs as BigInt.

How is that a Hibernate default?

Hibernate lets you define a multitude of types as a primary key, and the
sequence each uses is a matter of XML or annotation configuration, at least in
the Java version of Hibernate which is the only form of it that I've used.
I've used both "old-fashioned" Hibernate with *.hbm.xml mapping descriptors,
and the new-fangled JPA (Java Persistence API) version.

I've used Hibernate with String and (long) integer key types, sequenced and
not. For my learning, I use a system on Linux with Java and PostgreSQL. It
works just fine.

I'm not familiar with Grails.

--
Lew

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Judith Altamirano 2009-09-21 13:58:56 Working slow
Previous Message Nico Mandery 2009-09-18 14:51:09 Re: Rules, functions and RETURNING