Return-Path: Delivered-To: apmail-openjpa-users-archive@locus.apache.org Received: (qmail 86509 invoked from network); 14 Nov 2007 14:11:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Nov 2007 14:11:25 -0000 Received: (qmail 98652 invoked by uid 500); 14 Nov 2007 14:11:12 -0000 Delivered-To: apmail-openjpa-users-archive@openjpa.apache.org Received: (qmail 98626 invoked by uid 500); 14 Nov 2007 14:11:12 -0000 Mailing-List: contact users-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@openjpa.apache.org Delivered-To: mailing list users@openjpa.apache.org Received: (qmail 98612 invoked by uid 99); 14 Nov 2007 14:11:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Nov 2007 06:11:12 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of christian.defoy@gmail.com designates 64.233.166.183 as permitted sender) Received: from [64.233.166.183] (HELO py-out-1112.google.com) (64.233.166.183) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Nov 2007 14:11:16 +0000 Received: by py-out-1112.google.com with SMTP id f47so2787024pye for ; Wed, 14 Nov 2007 06:10:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=gtUP54bQOFBKKeAv12R6ahtMdVY3QUhbjBC08HTFXLM=; b=A+JQIMY8iK2cY0FW62LN5RKa38sdVliEoMr6ElslYcBlEMRkqDnOpZaUuqNbhxLjMoUdXvOst2ywT5fyZyYCt99mFQcJHNnbTZYRmJBIPakIobya1EkjWB/Spnn+ZUnSUsHcOF2M2RyjjNvOUj14/gMu9DiW81fdX6hs5uX6dxc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=UlKK8JcF0rkisaz9liQ5mPT+o+40JAuVYPPoRn7LeYe+uYVIQJnBp+k+dn1DVuGppBBB5FR1o+T7OIYOj9K0ZkPQS8lt/MCG4OBNgv7XaPkmL7zhxtrrIUlg9FzKBJKzDlrriYShJgZUahgkDBhokxd9fGDCR0bCnMbuilW6Ph8= Received: by 10.65.139.9 with SMTP id r9mr19184030qbn.1195049446333; Wed, 14 Nov 2007 06:10:46 -0800 (PST) Received: by 10.65.61.7 with HTTP; Wed, 14 Nov 2007 06:10:46 -0800 (PST) Message-ID: <967946b0711140610q178ecf2dt57636d6f24f90161@mail.gmail.com> Date: Wed, 14 Nov 2007 09:10:46 -0500 From: "Christian Defoy" To: users@openjpa.apache.org Subject: Re: Unexpected behavior with foreign key constraints In-Reply-To: <87AC5F88F03E6249AEA68D40BD3E00BE12BFFFBE@zcarhxm2.corp.nortel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <87AC5F88F03E6249AEA68D40BD3E00BE12BFFFBE@zcarhxm2.corp.nortel.com> X-Virus-Checked: Checked by ClamAV on apache.org It could be because OpenJPA does not know about your foreign keys... You have to tell OpenJPA that there is a foreign key using the @ForeignKey annotation or instruct OpenJPA to detect the foreign keys by inspecting your schema. To do this, you have to specify the following property in your persistence.xml: Hope this helps! Christian