From ddlutils-user-return-393-apmail-db-ddlutils-user-archive=db.apache.org@db.apache.org Wed Jun 07 13:08:57 2006 Return-Path: Delivered-To: apmail-db-ddlutils-user-archive@www.apache.org Received: (qmail 39719 invoked from network); 7 Jun 2006 13:08:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 7 Jun 2006 13:08:56 -0000 Received: (qmail 86153 invoked by uid 500); 7 Jun 2006 13:08:53 -0000 Delivered-To: apmail-db-ddlutils-user-archive@db.apache.org Received: (qmail 86064 invoked by uid 500); 7 Jun 2006 13:08:53 -0000 Mailing-List: contact ddlutils-user-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ddlutils-user@db.apache.org Delivered-To: mailing list ddlutils-user@db.apache.org Received: (qmail 86015 invoked by uid 99); 7 Jun 2006 13:08:53 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Jun 2006 06:08:53 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of tomdzk@gmail.com designates 64.233.182.188 as permitted sender) Received: from [64.233.182.188] (HELO nf-out-0910.google.com) (64.233.182.188) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Jun 2006 06:08:52 -0700 Received: by nf-out-0910.google.com with SMTP id h2so133491nfe for ; Wed, 07 Jun 2006 06:08:31 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=RLar3U8snP5g0HwlaipBEvnGKrn+UQMnbbleqK5LUtxEpD+QMp4nmqtPIuTkX2WQsTY6onS8vHs5K9wGfu/0uLe1lcUEZfLAtBq74Wia/tWazJrS1kclMNlHrTzyttPKQygDDsKTkizxUQK5W+BlvjPcmX4Xdfele2v7Q5rLi5E= Received: by 10.48.213.11 with SMTP id l11mr429103nfg; Wed, 07 Jun 2006 06:08:31 -0700 (PDT) Received: by 10.48.202.9 with HTTP; Wed, 7 Jun 2006 06:08:31 -0700 (PDT) Message-ID: <224f32340606070608m194454cfo8f0ee831e719b05f@mail.gmail.com> Date: Wed, 7 Jun 2006 15:08:31 +0200 From: "Thomas Dudziak" To: ddlutils-user@db.apache.org Subject: Re: Foreign Key problem In-Reply-To: <4486AB09.9040504@net-frame.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4485DED2.6060004@net-frame.com> <224f32340606070108m22f09ce8n9f7bcbf5dfee99ba@mail.gmail.com> <4486AB09.9040504@net-frame.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On 6/7/06, Terry Steichen wrote: > I forgot to mention that I had thought of that, and modified the name of > the foreign key to a different name. No change. > > Is it possible that the problem is that the target field for the foreign > key (in the PERSPECTIVE table) is set for auto-increment? (I've never > been sure how this would/should work anyway, because you can't insert > values into an auto-increment field.) Well, that is not exactly true: you can insert into an auto-increment field if the auto-increment is specified to allow this. For Derby, this can be done via the "generate by default as identity" column constraint (which is the one that DdlUtils uses). Though you'll likely have problems later on because the identity value generator does not pick up your inserted values, so it is likely that it spits out values that you've inserted manually before. > PS: when you say that the model worked fine for you, I presume you mean > that you could create a structure using the schema I provided. However, > I think the problem (as you can see from the stacktrace) comes when you > try to insert the data into that structure. Yes, you're right, my mistake. The stacktrace says that the key "15" is inserted twice, perhaps the data that you insert is wrong ? Tom