Re: CayenneModeler and Reengineering Database Schema

From: Michael Lepine (mikelepin..mail.com)
Date: Tue Nov 27 2007 - 09:31:54 EST

  • Next message: Tore Halset: "Re: CayenneModeler and Reengineering Database Schema"

    Very interesting. This sounds like what I'm looking for. Is there a
    link that contains a little more information on how this will work, or
    if you have a minute, would you give a brief synopsis of how this will
    be supported by the Modeler?

    On Nov 27, 2007 8:26 AM, Tore Halset <halse..vv.ntnu.no> wrote:
    > Hello.
    >
    > I think this is handled by the merge-stuff I have worked on. It will
    > be included in the next 3.0 milestone.
    >
    > https://issues.apache.org/cayenne/browse/CAY-885
    >
    > Regards,
    > - Tore.
    >
    >
    > On Nov 26, 2007, at 23:06 , Michael Lepine wrote:
    >
    > > Hello all.
    > >
    > > I am currently using CayenneModeler version 2.0.3 to reengineer a
    > > database schema and generate the subsequent Java classes. Some of the
    > > ObjEntity instances have primary/foreign keys mapped manually because
    > > these keys are generated by another process (outside of the Cayenne
    > > framework). The schema that I manage is very large and is periodically
    > > updated as part of maintenance and new development tasks. In order to
    > > update the model (...map.xml file) with the schema changes, I go
    > > through a fairly tedious process that involves the following:
    > >
    > > 1. update database schema
    > > 2. copy cayenne configuration files (cayenne.xml, ....map.xml and
    > > ...driver.xml) to a temp directory
    > > 3. start CayenneModeler
    > > 4. open the project from the temp directory
    > > 5. run Tools > Reengineer Database Schema
    > > 6. when prompted that a table exists, I opt to overwrite it to ensure
    > > I get all updates
    > > 7. save (temp) project
    > > 8. compare the differences between the temp map.xml and original
    > > map.xml files, manually copying the updates from the original to the
    > > temp file
    > > 9. test that I haven't made mistakes by opening the temp project and
    > > then double-checking it visually if it loads
    > >
    > > I do this because the manual mappings in the ObjEntity instances are
    > > removed when I run Reengineer Database Schema which does not seem like
    > > desired behavior. I would expect manual attribute mappings created in
    > > the ObjEntity instances to remain after reengineering a schema if:
    > >
    > > 1. the same schema is being reengineered
    > > 2. the corresponding DbEntity attribute still exists
    > >
    > > I downloaded the 2.0.4 and 3.0M2 versions of the Modeler to see if the
    > > behavior was different. It appears that manually mapped ObjEntity
    > > attributes are dropped in all versions under the above scenario.
    > >
    > > Is there an easier/more efficient way to update my model (map.xml)
    > > files?
    > >
    > > Has anyone else encountered a similar issue?
    > >
    > > Thank you for your help.
    > >
    > > - Mike
    > >
    >
    >



    This archive was generated by hypermail 2.0.0 : Tue Nov 27 2007 - 09:32:38 EST