Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id BAAB0633308 for ; Sat, 19 Sep 2009 00:02:45 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 87369-07 for ; Sat, 19 Sep 2009 03:02:35 +0000 (UTC) Received: from news.hub.org (news.hub.org [200.46.204.72]) by mail.postgresql.org (Postfix) with ESMTP id 159FC632EA9 for ; Sat, 19 Sep 2009 00:02:35 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.14.3/8.14.3) with ESMTP id n8J32XdW028609 for ; Sat, 19 Sep 2009 00:02:34 -0300 (ADT) (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.14.3/8.14.3/Submit) id n8J2c3YN012404 for pgsql-sql@postgresql.org; Fri, 18 Sep 2009 23:38:03 -0300 (ADT) (envelope-from news) From: Lew X-Newsgroups: pgsql.sql Subject: Re: Hibernate, web application and only one sequence for all primary keys Date: Fri, 18 Sep 2009 22:38:07 -0400 Organization: albasani.net Lines: 20 Message-ID: References: <25490498.post@talk.nabble.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@albasani.net X-User-ID: Gjy+y2lmGCMIeaBeOg1eDYhNe/izfqcB5kF/pSKrKlA= In-Reply-To: <25490498.post@talk.nabble.com> Cancel-Lock: sha1:JMcBMsfdOdRWL++LZYRbMvqjVAY= User-Agent: Thunderbird 2.0.0.23 (X11/20090817) X-NNTP-Posting-Host: XLmHiwlAXEkxy4Q5wm+ebt2ujqEz55Zh0W8cm9MnfPs= To: pgsql-sql@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=-10 required=5 tests=BAYES_50=0.001 X-Spam-Level: X-Archive-Number: 200909/96 X-Sequence-Number: 33161 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