Re: Reverse engineering existing tables... selectively

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Fri May 07 2010 - 03:22:54 EDT

  • Next message: Andrus Adamchik: "Re: Session Replication"

    Hi Mike,

    Reverse engineering dialog does not support complex expressions, only
    patterns supported by DatabaseMetaData.getTables():

    http://java.sun.com/j2se/1.5.0/docs/api/java/sql/DatabaseMetaData.html#getTables%28java.lang.String,%20java.lang.String,%20java.lang.String,%20java.lang.String
    []%29

    > If I can't do it this way and I
    > rev. eng. each table individually is there a way to have cayenne
    > automatically figure out and create the relationships or do I need
    > to do
    > that by hand?

    3.0 has a feature in the Modeler under Tools > Infer Relationships
    that can guess relationships if FK's follow naming convention
    "TARGETTABLENAME_ID". If they don't, relationships will have to be
    created manually.

    Not sure if "Tools > Migrate Database Schema" may also help here:

    http://cayenne.apache.org/doc30/migrate-changes-between-model-and-database.html

    Andrus

    On May 5, 2010, at 9:04 PM, MGargan..scholar.com wrote:

    > Hey everybody,
    >
    > When I try to reverse engineer an existing table, I want to
    > only
    > reverse eng. a few of the tables that are related to each other. The
    > problem is that they are named differently. When I put something like
    > this in...
    >
    > "ETL_BATCH" OR "ETL_BATCH_CONFIG" OR "ETL_PARAM"
    >
    > ...nothing happens. I've also tried with single and no quotes. Is
    > there
    > a way to do this or is this not possible? If I can't do it this way
    > and I
    > rev. eng. each table individually is there a way to have cayenne
    > automatically figure out and create the relationships or do I need
    > to do
    > that by hand?
    >
    > Thanks.
    > -Mike



    This archive was generated by hypermail 2.0.0 : Fri May 07 2010 - 03:23:38 EDT