Return-Path: Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: (qmail 35504 invoked from network); 21 Feb 2008 17:19:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Feb 2008 17:19:45 -0000 Received: (qmail 15557 invoked by uid 500); 21 Feb 2008 17:19:39 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 15552 invoked by uid 500); 21 Feb 2008 17:19:39 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 15543 invoked by uid 99); 21 Feb 2008 17:19:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Feb 2008 09:19:39 -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: local policy) Received: from [208.78.103.231] (HELO vorsha.objectstyle.org) (208.78.103.231) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 21 Feb 2008 17:19:06 +0000 Received: (qmail 11024 invoked from network); 21 Feb 2008 17:19:14 -0000 Received: from unknown (HELO localhost) (127.0.0.1) by localhost with SMTP; 21 Feb 2008 17:19:14 -0000 Message-Id: <0FD799F2-5205-42AF-A3D5-223815CA13B0@objectstyle.org> From: Andrus Adamchik To: user@cayenne.apache.org In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v915) Subject: Re: how to get update/insert SQL without committing to db Date: Thu, 21 Feb 2008 19:19:13 +0200 References: X-Mailer: Apple Mail (2.915) X-Virus-Checked: Checked by ClamAV on apache.org Tracing all changes can be accomplished by other means, e.g. via recording all GraphDiffs before commit (GraphDiffs are the internal format Cayenne uses to store object changes, that are later transformed to SQL). However I'd recommend investigating a DB-level backup solution, as a much more robust alternative. E.g. take a periodic production data dump, load it to the dev DB, then run some SQL script to make sure the data is appropriately massaged for the dev environment. This should work for the databases up to a certain size. Of course if you have terabytes of data, then it won't scale (or require a more fine grained approach to backup creation). Andrus On Feb 21, 2008, at 5:49 PM, Tobias SCHOESSLER wrote: > Hi Andrus, I did in fact forget about that. > > I was looking for an easy way to recreate parts of the object > network to transfer between stages of our application. E.g. create > SQL for a data set to insert it in the development db for testing. > > Tobias > > > Andrus Adamchik > Thursday, 21 February 2008 14:38 > Please respond to > user@cayenne.apache.org > > To > user@cayenne.apache.org > cc > Subject > Re: how to get update/insert SQL without committing to db > > > > > > Hi Tobias, > > Could you elaborate a bit on how are you going to use this SQL? SQL > generated by Cayenne is in a PreparedStatement format, so it will not > be usable for say manual execution from a SQL client. > > Andrus > > > > On Feb 21, 2008, at 2:55 PM, Tobias SCHOESSLER wrote: > > Hi, > > > > is there a way to get the update/insert SQL statements ( e.g. as a > > String ) that cayenne would execute with a commit, without actually > > committing to the db? > > > > thank you > > > > Tobias > >