facebook

MyEclipse Rev. Eng for not drawing constraing lines

💡
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 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #317924 Reply

    Mork
    Participant

    Hello,

    I have a database that’s defined below, but when I reverse engineer it in MyE to see the ERD, I don’t have any line connections between the tables.

    However, when I reverse engineer it into Hibernate domain objects from MyE, the 1:M relationships are correct (1:M between publisher and books, and 1:M between books and chapters).

    Is there something I’m missing with MySQL and MYE’s reverse engineering?

    How do I get the constraint lines to show up.

    Thanks,

    – m

    (Database below from Hibernate Recipes book)

    — —————————-
    — Table structure for `BOOK`
    — —————————-
    DROP TABLE IF EXISTS `BOOK`;
    CREATE TABLE `BOOK` (
    `ISBN` varchar(50) NOT NULL DEFAULT ”,
    `BOOK_NAME` varchar(100) NOT NULL,
    `PUBLISHER_CODE` varchar(4) DEFAULT NULL,
    `PUBLISH_DATE` date NOT NULL,
    `PRICE` int(11) NOT NULL,
    PRIMARY KEY (`ISBN`),
    KEY `ISBN` (`ISBN`),
    KEY `PUBLISHER_CODE` (`PUBLISHER_CODE`),
    CONSTRAINT `PUB` FOREIGN KEY (`PUBLISHER_CODE`) REFERENCES `publisher` (`CODE`) ON DELETE CASCADE ON UPDATE CASCADE
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;

    — —————————-
    — Records of `BOOK`
    — —————————-
    INSERT INTO `BOOK` VALUES (‘PBN123’, ‘Spring Recipes’, ‘001’, ‘2008-02-02′, ’30’), (‘PBN456’, ‘Hibernate Recipes’, ‘002’, ‘2008-11-02′, ’40’);

    — —————————-
    — Table structure for `CHAPTER`
    — —————————-
    DROP TABLE IF EXISTS `CHAPTER`;
    CREATE TABLE `CHAPTER` (
    `BOOK_ISBN` varchar(50) NOT NULL DEFAULT ”,
    `IDX` int(11) NOT NULL,
    `TITLE` varchar(100) NOT NULL,
    `NUM_OF_PAGES` int(11) NOT NULL,
    KEY `BOOK_ISBN` (`BOOK_ISBN`),
    CONSTRAINT `ISBN` FOREIGN KEY (`BOOK_ISBN`) REFERENCES `book` (`ISBN`) ON DELETE CASCADE ON UPDATE CASCADE
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;

    — —————————-
    — Table structure for `PUBLISHER`
    — —————————-
    DROP TABLE IF EXISTS `PUBLISHER`;
    CREATE TABLE `PUBLISHER` (
    `CODE` varchar(4) NOT NULL,
    `PUBLISHER_NAME` varchar(100) NOT NULL,
    `ADDRESS` varchar(200) NOT NULL,
    PRIMARY KEY (`CODE`),
    KEY `CODE` (`CODE`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;

    — —————————-
    — Records of `PUBLISHER`
    — —————————-
    INSERT INTO `PUBLISHER` VALUES (‘001’, ‘APress’, ‘New York, New York’), (‘002’, ‘Manning’, ‘San Francisco, CA’);

    #317934

    support-swapna
    Participant

    Mork,

    1) Here is a tutorial for reverse engineering using Hibernate. Take a look:
    http://www.myeclipseide.com/documentation/quickstarts/hibernateintroduction/#ReverseEngineering

    2) Which version of MyEclipse are you working with ? Can you check if you see the same issue with constraint lines on Classic Eclipse version ? If you are working with MyEclipse 9, then the base Classic Eclipse version will be 3.6.

    3) Also attach a visual for the issue you are seeing.

    #317940

    Mork
    Participant

    @support-swapna wrote:

    Mork,

    1) Here is a tutorial for reverse engineering using Hibernate. Take a look:
    http://www.myeclipseide.com/documentation/quickstarts/hibernateintroduction/#ReverseEngineering

    2) Which version of MyEclipse are you working with ? Can you check if you see the same issue with constraint lines on Classic Eclipse version ? If you are working with MyEclipse 9, then the base Classic Eclipse version will be 3.6.

    3) Also attach a visual for the issue you are seeing.

    Thanks for your reply.

    I’m using MyEcilpse for Spring, latest version (9.1 for the Skyway plug-in).

    And, as I noted in my posting above (and in the actual database SQL), MyEclipse is generating the correct domain classes with the correct Set<> objects for the database 1:M relationships.

    The only issue is that when I reverse engineer an ERD from the MySQL database, I don’t get the lines between the tables. Instead, I just get the tables.

    Not that it should matter, but I’m using the Mac version of MyEclipse for Spring.

    I will email you a graphic of the ERD generated from the SQL above.

    Perhaps you can create a MySQL database using the SQL above and try the ERD reverse engineering as well on your Mac version?

    Look forward to hearing back.

    Thanks.

    m

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: MyEclipse Rev. Eng for not drawing constraing lines

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