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 <andru..bjectstyle.org>
> Thursday, 21 February 2008 14:38
> Please respond to
> use..ayenne.apache.org
>
> To
> use..ayenne.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
>
>
This archive was generated by hypermail 2.0.0 : Thu Feb 21 2008 - 12:19:45 EST