Re: Keeping sync modeler files with db

From: Todd O'Bryan (toddobrya..ac.com)
Date: Fri Jul 01 2005 - 10:11:46 EDT

  • Next message: Andreas Pardeike: "SQLTemplate + setFetchingDataRows"

    Oh. Yeah it seems that would be more complicated.

    Just out of curiosity, why are you manually manipulating the
    database? It seems like once you have a Cayenne model that's what
    you'd want to use to evolve the model. The whole point is not having
    to deal directly with the database, right? :-)

    Todd

    On Jul 1, 2005, at 10:09 AM, Erdinc Kocaman wrote:

    > 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:11:49 EDT