His way also works database -> modeler. :-)
This topic has come up before and, while it sounds really nifty (and it is),
it would be extremely difficult to implement, especially across different
database venders and especially if you want to ensure the integrity of the
merged data set.
The easiest way to do it is as described. Keep a set of .sql files around
that will update your schema to a given revision. Update your model to
match. This also makes sense in a real dev/test/acpt/prod environment. I
would never ever ever click a ³magic² button in a GUI tool to go and update
my production schema for me. You need precise control over that situation,
especially when you have years and years of financial/etc data to preserve.
Surprises are a bad thing. :-)
/dev/mrg
From: Erdinc Kocaman <ekocama..enduro.com>
Reply-To: <cayenne-use..bjectstyle.org>
Date: Fri, 1 Jul 2005 17:09:26 +0300
To: <cayenne-use..bjectstyle.org>
Subject: RE: Keeping sync modeler files with db
You add fields manually in modeler. Your way is from modeler to database but
I am trying to do the opposite.
Did you try to import changes from database using cayenne modeler import
tool(more specifically, reengineer database schema function) ? In this case,
information about relationships is lost.
I add new fields to table in MSSQL enterprise manager and tried to sync
modeler with new fields but it is somewhat problematic as I said before. I
try to understand if there is a practical way to do this.
From: Todd O'Bryan [mailto:toddobrya..ac.com]
Sent: 01 Temmuz 2005 Cuma 16:56
To: cayenne-use..bjectstyle.org
Subject: Re: Keeping sync modeler files with db
Following someone else's suggestion (so much for attribution of good ideas),
I save the .sql file but don't let the modeler modify the database.
My first SQL file is setup01.sql. When I want to add something, I save it as
setup02.sql and go in to remove all the drop and create table statements
plus the statements for AUTO_PK_SUPPORT that I don't need (because they were
taken care of in the 01 file). To set up a test database, I just run all the
.sql files in order. To modify my production database, I just run the one
file I've just created.
It does require some careful editing, but I don't usually add more than a
table or two on each iteration, so it's not so bad.
HTH,
Todd
On Jul 1, 2005, at 9:11 AM, Erdinc Kocaman wrote:
Hi all,
How can you keep modeler files synchronized with db? I am adding fields to
db and try to sync the modeler file but relation information of db
entities(not object entities) is lost. What procedure do you follow to synch
the modeler file?
Thanks,
This archive was generated by hypermail 2.0.0 : Fri Jul 01 2005 - 10:19:51 EDT