Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ant task for generating ER diagram from JPA/Hibernate annotated classes

Does anyone know of a tool that can do that?

Linguine maps seems to only work on old hibernate xml files. And the hibernate tool task hbm2hbmxml seems to have a bug so that I can't do the two step process "annotations->hbmxml->diagram"

Best, Anders

like image 537
anders.norgaard Avatar asked Jun 19 '09 13:06

anders.norgaard


2 Answers

Hmm, I've found this great post on developerworks. There the author seems to generate entity diagrams from a live database. I wonder if I can go "annotated classes -> live db (eg. H2) -> SchemasSpy generated diagram?

And yes, API Viz looks great.

I've blogged my hacky solution with SchemaSpy.

like image 115
anders.norgaard Avatar answered Oct 06 '22 07:10

anders.norgaard


Not quite what you're looking for but you could use API Viz which automatically produces UML like diagrams from class hierarchies and can be augmented with doclet tags.

You'd have to mark up your classes a little, but it's a great tool and worth using wherever you're trying to visualise large or complex projects.

like image 24
AndyT Avatar answered Oct 06 '22 06:10

AndyT