Why I cannot generate ERD from class model?

There is nothing happen when I select Synchronize to Entity Relationship Diagram, no matter from the popup menu of class diagram or from Tools > Hibernate menu…

Synchronize from class model to ERD

Synchronize from class model to ERD

This is because your class was not specified with the ORM Persistable stereotype. Only the classes with ORM Persistable stereotype will consider to mapped with entities and generate into ERD. To specify the ORM Persistable stereotype to class:

  1. Right click on the class and select Stereotypes > Edit Stereotypes… from popup menu.

    Select Edit Stereotype form class's popup menu

    Select Edit Stereotype form class’s popup menu

  2. Scroll the All stereotype list to locate the ORM Persistable stereotype, then press the right arrow button to add it to the Selected list.

    Select ORM Persistable stereotype

    Select ORM Persistable stereotype

  3. Press OK to confirm the change and close the Class Specification dialog.
  4. For the other classes you can right click on it and select Stereotypes > ORM Persistable to apply the stereotype.

    For other classes select ORM Persistable stereotype from popup menu

    For other classes select ORM Persistable stereotype from popup menu

  5. Once you have specified ORM Persistable stereotypes to your classes then ERD will be created for you during the synchronization process.

    Entity relationship diagram generated accoridng to the class model

    Entity relationship diagram generated accoridng to the class model

Related Know-how

Related Links

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply