Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 92063 invoked from network); 16 Oct 2006 15:21:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 16 Oct 2006 15:21:56 -0000 Received: (qmail 84463 invoked by uid 500); 16 Oct 2006 15:21:55 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 84289 invoked by uid 500); 16 Oct 2006 15:21:54 -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 84278 invoked by uid 99); 16 Oct 2006 15:21:54 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Oct 2006 08:21:54 -0700 X-ASF-Spam-Status: No, hits=0.3 required=10.0 tests=MAILTO_TO_SPAM_ADDR X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [199.89.234.134] (HELO gateway1.monsanto.com) (199.89.234.134) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Oct 2006 08:21:51 -0700 Received: from agstlsmtp03.monsanto.com (agstlsmtp03.monsanto.com [10.30.65.106]) by gateway1.monsanto.com (Switch-3.2.5/Switch-3.2.4) with ESMTP id k9GFLPu9003185 for ; Mon, 16 Oct 2006 10:21:25 -0500 (CDT) thread-index: AcbxN+t8/NCi6L7gS/OaUqHDYaF72g== Received: from agstlhub02.monsanto.com ([10.30.64.99]) by agstlsmtp03.monsanto.com with Microsoft SMTPSVC(6.0.3790.1830); Mon, 16 Oct 2006 10:29:50 -0500 Received: by agstlhub02.na.ds.monsanto.com with Internet Mail Service (5.5.2653.19) id ; Mon, 16 Oct 2006 10:21:24 -0500 Message-ID: <2526D42D65F597428BFF422D6AB79E9E0108FB17@NA1000EXM01.na.ds.monsanto.com> From: "BALDWIN, ALAN J [AG-Contractor/1000]" To: "Derby Discussion" , Subject: RE: Is it Possible to Turn off Referential Constraints for a DBUNIT Load? Content-Transfer-Encoding: 7bit Date: Mon, 16 Oct 2006 10:21:09 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) content-class: urn:content-classes:message Importance: normal x-mimeole: Produced By Microsoft MimeOLE V6.00.3790.2757 Priority: normal x-originalarrivaltime: 16 Oct 2006 15:21:10.0480 (UTC) FILETIME=[B5A73500:01C6F136] Content-Type: text/plain; charset="iso-8859-1" X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Chris, Are you loading the data in the intial xml files in the correct order? That makes a difference. Lowest level tables should go at the top of the file, so that they are inserted first in dbunit's DatabaseOperation.INSERT operation, and they are deleted last in the DatabaseOperation.DELETE_ALL operation. Could this be your problem, or are you just trying to load up the database without having to specifically load FK tables? It can be a pain, but it does result in a better test if everything is loaded correctly. I've used DBUnit a lot with Derby, and I've never had the need to turn off referential integrity as long as the xml files had all the necessary data in them, and they were in the correct order. Hope this helps. -Alan- -----Original Message----- From: chas66@gmail.com [mailto:chas66@gmail.com] On Behalf Of Chris Barham Sent: Monday, October 16, 2006 6:07 AM To: Derby Discussion; msegel@segel.com Subject: Re: Is it Possible to Turn off Referential Constraints for a DBUNIT Load? On 10/16/06, Michael Segel wrote: > [mjs] > If you think about it, you don't have to *have* referential constraints on a > table. They are placed there for a reason. > > So why do you want to load data that may violate them? Because DBUnit is a very convenient way to put a database into a known state, except when references become a problem for the flat file nature of the source. No other reason; I am not a mysql fanboy, merely trying to get stuff done. Chris --------------------------------------------------------------------------------------------------------- This e-mail message may contain privileged and/or confidential information, and is intended to be received only by persons entitled to receive such information. If you have received this e-mail in error, please notify the sender immediately. Please delete it and all attachments from any servers, hard drives or any other media. Other use of this e-mail by you is strictly prohibited. All e-mails and attachments sent and received are subject to monitoring, reading and archival by Monsanto. The recipient of this e-mail is solely responsible for checking for the presence of "Viruses" or other "Malware". Monsanto accepts no liability for any damage caused by any such code transmitted by or accompanying this e-mail or any attachment. ---------------------------------------------------------------------------------------------------------