Mohammad Moghimi
Mohammad Moghimi

Reputation: 4696

Tool to generate a ERD (entity-relation diagram) based on JPA annotations

I'm writing a java code using ormlite. I was wondering if it's possible to generate an ERD from the JPA annotations in my code. Basically, I need the reverse of this: How can I transform Entity-Based diagram to a JPA java code

Upvotes: 16

Views: 25464

Answers (2)

Knights Queens
Knights Queens

Reputation: 1

+--------------------+ +------------------+ | Tracks | | SpotifyData | +--------------------+ +------------------+ | track_id (PK) |<--------+ track_id (FK) | | track_name | | in_spotify_playlists | | artist_name | | in_spotify_charts| | artist_count | | streams | | released_year | +------------------+ | released_month | | released_day | +------------------+ | bpm | | AppleData | | track_key |<--------+ track_id (FK) | | mode | | in_apple_playlists| | danceability | | in_apple_charts | | valence | +------------------+ | energy | | acousticness | +------------------+ | instrumentalness | | DeezerData | | liveness |<--------+ track_id (FK) | | speechiness | | in_deezer_playlists| | cover_url | | in_deezer_charts | +--------------------+ +------------------+

                            +------------------+
                            |   ShazamData     |
                            +------------------+
                            | track_id (FK)    |
                            | in_shazam_charts |
                            +------------------+

Upvotes: 0

Hollis Waite
Hollis Waite

Reputation: 1079

IntelliJ IDEA (Ultimate) provides JPA to ER-Diagram generator.

context menu

In the Persistence tool window, select appropriate node. Then use context menu to select "ER Diagram".

sample ER diagram

Note that JPA facet must be linked to module and UML plugin should be active.

Upvotes: 16

Related Questions