Re: Creating initial postgres model

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Tue Mar 23 2004 - 11:58:04 EST

  • Next message: Terry Wilcox: "Expression toString() vs. fromString()"

    Even though I haven't been able to reproduce it on my Postgres version,
    I think I might know what it is. Table info is read via JDBC API:

    DatabaseMetaData md;
    ResultSet rs = md.getTables(catalog, schemaPattern, tableNamePattern,
    types);

    "types" argument seems to always be null, thus pulling all possible
    tables and views. Since this hasn't caused any problems so far (or no
    one bothered to report them), it has been overlooked (looks like my
    test version of Postgres only contains real tables). I will open a bug
    report and investigate further.

    Todd, till the fix is implemented, you'll have to manually delete those
    extra tables. And also let me know what version of PostgreSQL and JDBC
    driver you are using.

    Thanks
    Andrus

    On Mar 23, 2004, at 11:41 AM, Mike Kienenberger wrote:

    >> On Mar 23, 2004, at 9:26 AM, Todd Blanchard wrote:
    >>> reverse engineer the db.
    >>>
    >>> I was very surprised to find it model each sequence as a table and
    >>> just as surprised to find it had created what looks like a primary
    >>> key
    >>> table for each table. Is this expected?
    >
    > Andrus Adamchik <andru..bjectstyle.org> wrote:
    >> No. Postgres reverse engineering always worked fine producing entities
    >> for tables and views. What you describe sounds very weird... Do you
    >> have any details?
    >
    > I thought only the Oracle Adaptor supported sequences.
    > Could this be the problem?
    >
    > That would explain the primary key tables.
    > It may also explain the sequence "Entities" created if the modeler
    > didn't
    > realize that they were not standard tables.
    >
    > Obviously, I'm speaking from complete ignorance here, not having used
    > Postgres with Cayenne.
    >
    > -Mike



    This archive was generated by hypermail 2.0.0 : Tue Mar 23 2004 - 11:58:09 EST