Re: [FIXED] Creating initial postgres model

From: Todd Blanchard (tblanchar..ac.com)
Date: Tue Mar 23 2004 - 14:55:23 EST

  • Next message: Bret Gregory: "Clone an Object and Create New PK"

    Thank you very much! As a recovering WebObjects developer, I'm looking
    forward to diving into Cayenne.

    On Mar 23, 2004, at 12:15 PM, Andrus Adamchik wrote:

    > Ok, finally got a minute to actually try it out instead of guessing.
    > See http://objectstyle.org/jira/secure/ViewIssue.jspa?key=CAY-109 for
    > details. In short - this is a bug, and it is fixed and will be
    > released soon.
    >
    > Workaround: until this is fixed, do not create an empty DataMap before
    > reengineering. Instead select a postgres DataNode and do reengineer.
    > Newly created DataMap will contain correct subset of tables.
    >
    > Andrus
    >
    >
    > On Mar 23, 2004, at 11:58 AM, Andrus Adamchik wrote:
    >
    >> 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 - 14:55:38 EST