Return-Path: X-Original-To: apmail-openjpa-dev-archive@www.apache.org Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6FD1D76EC for ; Thu, 29 Dec 2011 16:01:58 +0000 (UTC) Received: (qmail 57438 invoked by uid 500); 29 Dec 2011 16:01:56 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 57001 invoked by uid 500); 29 Dec 2011 16:01:56 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 56985 invoked by uid 99); 29 Dec 2011 16:01:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Dec 2011 16:01:55 +0000 X-ASF-Spam-Status: No, hits=-2001.3 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Dec 2011 16:01:53 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 78A8212E9E9 for ; Thu, 29 Dec 2011 16:01:31 +0000 (UTC) Date: Thu, 29 Dec 2011 16:01:31 +0000 (UTC) From: "Harald Wellmann (Created) (JIRA)" To: dev@openjpa.apache.org Message-ID: <1847539397.51723.1325174491495.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Created] (OPENJPA-2103) Incorrect statement order on flush with foreign keys MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org Incorrect statement order on flush with foreign keys ---------------------------------------------------- Key: OPENJPA-2103 URL: https://issues.apache.org/jira/browse/OPENJPA-2103 Project: OpenJPA Issue Type: Bug Components: jpa Affects Versions: 2.1.1 Reporter: Harald Wellmann Attachments: openjpa-foreign-key.zip In a schema with a cascading association with a foreign key, I'm having strange effects where the SQL statements generated on em.flush() somtimes appear in the wrong order. I've reduced this to a funny case where a passing test starts failing, as soon as it is preceded by em.flush(): @Test public void testFlushFailure() { em.flush(); testFlushOk(); } The same tests both pass on Hibernate. I'm attaching a self-contained Maven Project to demonstrate the issue. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira