Re: reverse engineering a postgresql database: no relationships detected?

From: WONDER (mmmmmmmmm5..eb.de)
Date: Mon Mar 13 2006 - 14:33:55 EST

  • Next message: WONDER: "Double Model in frameworks and application"

    Well, indeed the PKs had the same name in my test.
    I made the test again. So imported the enteties again. I still get the relationships, but I get the enteties double.
    What makes the reengineering of course useless.

    Sako.
      ----- Original Message -----
      From: Cris Daniluk
      To: cayenne-use..bjectstyle.org
      Sent: Monday, March 13, 2006 4:57 PM
      Subject: Re: reverse engineering a postgresql database: no relationships detected?

      Very interesting... I have a little test case setup and it actually appears that it successfully imports only when the PK and FK column names match.

      Still too early to say if this is the problem and why, but it is interesting nonetheless.

      On 3/11/06, WONDER <mmmmmmmmm5..eb.de> wrote:
        Well, I dont know about the solution in Cayenne.
        this is my env.
        sun-jdk 1.5.0.06

        postgresql 8.1.3
        cayenne 1.2M11
        jdbc driver 8.2dev-501 JDBC 3 // Do you use beta? or you mean 5.01?? Yours 8.2dev-510.jdbc3
        http://jdbc.postgresql.org/download.html

        Windows. // however this is java.

        "It works with an empty project "
        I have table and model wihtout relations in db. I added relations to db and reengineerd. I see now the relations in the Cayenne GUI.
        I alos added completely new table with relationships with an old table and reengineerd the model.
        It works here.

        I see the relations twice even now like
        --------------------------------------
        Old Table Artist
        New Table test

        After reengineer

        Old Table Artist
                toArtist
                toArtist1 // I think this should be cleaned in Cayenne.

        New Table test
                toArtist
         
        --------------------------------------

        If you mean this doesnt work for you, i would update to 1.2M11 first.

        Sako.

        ----- Original Message -----
        From: Tomi NA
        To: cayenne-use..bjectstyle.org
        Sent: Saturday, March 11, 2006 6:25 PM
        Subject: Re: reverse engineering a postgresql database: no relationships detected?

        On 3/11/06, WONDER < mmmmmmmmm5..eb.de> wrote:
          Hello,

          I am not sure if i understand you.
          I am using PostgreSQL 8.1.3 with the jdbc 8.2dev-501 JDBC 3
          and already imported tables with thier relationships!

          Try to update the server/jdbc and if now maybe you ask again to send the other settings.

          Sako.

        I'm updating postgresql to 8.1.3 as I write this: I'll see what I come up with.
        As for other relevant information, here's my environment description:
        sun-jdk 1.5.0.06
        postgresql 8.1.2
        cayenne 1.2M10
        jdbc driver 8.2dev-510.jdbc3
        gentoo linux, custom 2.6.15 kernel

        Status update:
        I've just upgraded pgsql from 8.1.2 to 8.1.3 and now reengineering works. Sort of. It works with an empty project (=the first time it's called). If I add a test table referencing an existing table in the database and try to reengineer, I see the same behaviour as before.
        I'd say this suggest that we should look for a solution in the cayenne code, instead of the pgsql-jdbc code.

        Tomislav



    This archive was generated by hypermail 2.0.0 : Mon Mar 13 2006 - 14:31:30 EST