Return-Path: Delivered-To: apmail-openjpa-users-archive@minotaur.apache.org Received: (qmail 20911 invoked from network); 22 Jun 2009 11:04:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 22 Jun 2009 11:04:12 -0000 Received: (qmail 41839 invoked by uid 500); 22 Jun 2009 11:04:23 -0000 Delivered-To: apmail-openjpa-users-archive@openjpa.apache.org Received: (qmail 41784 invoked by uid 500); 22 Jun 2009 11:04:22 -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 41774 invoked by uid 99); 22 Jun 2009 11:04:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Jun 2009 11:04:22 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of wangyumi@gmail.com designates 209.85.216.199 as permitted sender) Received: from [209.85.216.199] (HELO mail-px0-f199.google.com) (209.85.216.199) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Jun 2009 11:04:13 +0000 Received: by pxi37 with SMTP id 37so2709142pxi.25 for ; Mon, 22 Jun 2009 04:03:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=ISWTuGONGZ6s7jHK8t0m4J7JgXOszZMG4Fm4KHXV8TY=; b=O0c1ZgWKFywz+yUnBbH5B9dcRINfkkw3WDxOv/Wn6LkZ54gkXmfy++OFJrerZLg9Li 7471XwpvvBwz+/wvtbC7z9d/9nLXeWUPlzGsOjktNZCV9slxjvs+n+poZXSv7wr3qunZ siJ5MMOyjpHMRpl2uCkk6Dj9seJdA2EsC/72M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=tjd3mVn3ydpgKji24j+cmgYLZbPzi24WLycwiE1rkS1PiWwxBST1dn/2ac9Ha1tPSu y2vrsjFD/oDrwHBao2Oqjy9UnAx+avmyf8r+V6QQZ88bjg4Qdl9sL1cDLo/+yhhkRqoE jR/DfmRXZIIp7KlyJZMTmWxbVf4TSdqL27DWU= MIME-Version: 1.0 Received: by 10.142.241.15 with SMTP id o15mr2552267wfh.258.1245668631247; Mon, 22 Jun 2009 04:03:51 -0700 (PDT) Date: Mon, 22 Jun 2009 19:03:51 +0800 Message-ID: Subject: Foreign key error if using GenerationType.AUTO or GenerationType.TABLE From: wang yu To: users@openjpa.apache.org Content-Type: multipart/mixed; boundary=000e0cd1469045fc61046cedd464 X-Virus-Checked: Checked by ClamAV on apache.org --000e0cd1469045fc61046cedd464 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hello, If I use GenerationType.AUTO or GenerationType.TABLE for PK field and let OpenJPA persist some entities cascade , in some cases, OpenJPA will try to persist child entity before the father entity. How to resolve this issue? I must use GenerationType.AUTO for oracle because it doesn't support GenerationType.IDENTITY naturally. Or do I have a chance to use GenerationType.IDENTITY for Pk fields of oracle database? I have attached the log information in attached file. Thanks! Regards, Yu Wang --000e0cd1469045fc61046cedd464--