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

2

16

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

Triangulate answered 17/4, 2012 at 7:33 Comment(2)
Can't you let JPA create the tables and then generate the ERD from the actual database?Parham
That's a possibility. You mean something like this? #2988 right? But It'd be better if is possible to generate ERD directly from java codes.Triangulate
V
16

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.

Vicinal answered 31/10, 2013 at 22:41 Comment(0)
N
0

+--------------------+ +------------------+ | 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 |
                            +------------------+
Nomism answered 30/5, 2024 at 5:25 Comment(1)
As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.Favouritism

© 2022 - 2025 — McMap. All rights reserved.