facebook

Problem with DB Explorer

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 11 posts - 46 through 56 (of 56 total)
  • Author
    Posts
  • #219465

    support-jeff
    Member

    Please clarify “same behavior”…what is happening in your case. I think the FK panel bug was resolved in 3.8.2. If not, the next release will be soon (early-December).

    #219467

    Apologies, the behaviour is thus:

    When viewing tables within the “Table Info” view, the “Foreign Keys” tab never shows the foreign keys. This I believe has a knock on affect; when running the Hibernate Wizard it will bring across the table information but if table A has a foreign key to table B, denoted by a Integer key, it will not create the object reference (to a table B object) in table A, it will just use an Integer.

    Now, I’m relatively new to Hibernate and MyEclipse, but using it on a PC and connecting to a MSSQL database (yesterday at the office) and doing the exact same steps, it worked. In my investigation I found a funny thing in the .hbm file, in that regardless to what I selected, the generator is always blank:

            <id name="id" column="id" type="java.lang.Integer">
                <generator class=""/>
            </id>

    I’m not sure this has *any* bearing, but I recall it had a value when I did it at the office. I’ll verify this on Monday.

    Thank you for your very quick response, and I hope this rather garbbled information helps.

    Cheers

    Christopher

    #219469

    support-jeff
    Member

    Maybe I am not recalling properly, but the version of MySQL you are using does not support foreign keys. From the MySQL docs:

    Starting from MySQL 3.23.44, InnoDB features foreign key constraints.

    And, yes, this will affect how the Hibernate tool maps the objects generated. Please do verify the id generator issue, and attach any error logs that are associated with it.

    #219470

    Yes, you are correct about only InnoDB allowing foreign keys, but this DB and all it’s tables are InnoDB and they all have foreign keys. The 3.06/3.0.15 refers to the MySQL Driver (Connector/J) not the database, I am using MySQL 4.0.15.

    Sorry for the confuusion.

    #219471

    support-jeff
    Member

    Ok, that makes more sense. However, I still contend that this bug was fixed in 3.8.2. Could you see if any errors are being logged relating to the DB Explorer plugin? Also, please forward the build number for MyEclipse that you have installed (Help->About Eclipse Platform and then click on the MyEclipse icon; look for “Build id”).

    #219474

    Version: 3.8.2
    Build id: 200409171200-3.8.2

    I can find no logs relevant to this view/driver. I’ve tried “Console” and all the directories (Eclipse/MyEclipse…).

    #219475

    support-jeff
    Member

    Cannot understand it. Possibly not the same issue then, since the previous bug was resolved in 3.8.2. Could you attach the DDL for the table/fk definition?

    #219476

    Jeff, please bear with my ignorance, but where would I get the DDL?

    Another thing I have noticed under the “DB Connection Info” view is that regardless of the drivers I select, the “Driver Version” for connection toi this database is “3.1.0-alpha…”. It never changes, regardless to whatever driver I use to setup the connection. I presume this would have some bearing, no?

    Off to bed now in Blighty, thanks for all the help so far.

    Night

    Christopher

    #219532

    After having a fiddle with the drivers on Mac OS X and gettign not much further along the way, I have just tried on an XP box using MySQL Connector/J 3.0.15 (3.0.16 is out later today as well). And using the same database/tables/FKs it works perfectly.

    I think the issue is with the MyEClipse ‘DB Browser’ setup, in that it does nto make a difference if you try and use a seperate MySQL driver (specified in the Connection setup) it will always use its default one (in my installation that is 3.0.10). This can be plainly seen after adding a seperate driver, open a connection and then navigating to the ‘DB Connection Info’ view.

    Jeff, is the a way to force MyEclipe to use the non-default MySQL driver?

    Either way, I now have my correct Hibernate Abstract classes, it is just a shame I had to ressurect an old PC to get the job done 🙁

    #219533

    Riyad Kalla
    Member

    Jeff, is the a way to force MyEclipe to use the non-default MySQL driver?

    On the “Extra Class Path” tab when setting up a driver, when you add the JARs, in the dropdown box below you can either select the driver name OR type one in manually, if you need to use a different driver name just type it in here.

    #219542

    Riyad, you are right, and that was exactly what I did, but I selected a “New” jar and then listed it’s drivers. Once selected, and used, MyEClipse continued to use it’s default MySQL driver, not the one I pointed to.

Viewing 11 posts - 46 through 56 (of 56 total)
Reply To: Problem with DB Explorer

You must be logged in to post in the forum log in