suken / UmlGeneratorTool

Java software development tool for Spring, JPA, class diagrams etc
12 stars 1 forks source link

ISSUE1 - JPA diagram duplicate dependencies #9

Closed suken closed 9 years ago

suken commented 9 years ago

Duplicate dependencies are created between entities when there is a reverse mapping present in the class. Follow the following rules to avoid generating duplicate mappings:

  1. Remove duplicates for ONE-TO-ONE relationships
  2. Remove duplicates for ONE-TO-MANY relationships.
  3. Remove duplicates for MANY-TO-MANY relationships.
  4. Priority to ONE-TO-MANY over MANY-TO-ONE.
suken commented 9 years ago

Updated the JPA mapping UML generation logic to remove duplicate mappings. Also updated the JPA mapping logic to convert reverse ONE_TO_MANY relationships between associated classes to MANY_TO_MANY relationship.

Additionally added new notation for ONE_TO_ONE and MANY_TO_MANY JPA mappings. Setting the status of the issue to CLOSED.