Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 88520 invoked from network); 14 Jun 2006 12:15:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 14 Jun 2006 12:15:31 -0000 Received: (qmail 65433 invoked by uid 500); 14 Jun 2006 12:15:29 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 65409 invoked by uid 500); 14 Jun 2006 12:15:29 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 65398 invoked by uid 99); 14 Jun 2006 12:15:29 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Jun 2006 05:15:29 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of gcaddu-derby-user@m.gmane.org designates 80.91.229.2 as permitted sender) Received: from [80.91.229.2] (HELO ciao.gmane.org) (80.91.229.2) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Jun 2006 05:15:28 -0700 Received: from root by ciao.gmane.org with local (Exim 4.43) id 1FqUH0-0002ut-Re for derby-user@db.apache.org; Wed, 14 Jun 2006 14:15:02 +0200 Received: from host252-220-static.36-88-b.business.telecomitalia.it ([88.36.220.252]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 14 Jun 2006 14:15:02 +0200 Received: from netmaniac by host252-220-static.36-88-b.business.telecomitalia.it with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 14 Jun 2006 14:15:02 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: derby-user@db.apache.org From: Diego Cattelan Subject: Identity/Sequence Date: Wed, 14 Jun 2006 13:22:28 +0200 Lines: 33 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: host252-220-static.36-88-b.business.telecomitalia.it User-Agent: Mozilla Thunderbird 1.5.0.2 (X11/20060501) Sender: news X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi, i'm investigating on using derby for some new project i'll start next week, but i'm facing in some trouble/misunderstanding of derby identity. If i declare a column as ... GENERATED ALWAYS AS IDENTITY derby fills it correctly with an increasing value. My problem is: in my application logic i will obviously reuse previous-projects libraries in wich sometimes i use two tables sharing the same generator/sequence. In Oracle,PostgreSQL and Firebird i do something like create sequence asequence starting with 1; create table tableA( ... id integer GENERATED ALWAYS AS IDENTITY BY asequence, ...) create table tableB( ... id integer GENERATED ALWAYS AS IDENTITY BY asequence, ...) i need to do the same with derby, but how can i do that ? Tanks