In the past I've used AndroMDA for generating domain model from an UML class diagram. First EJB2, then Hibernate and in the last projects EJB3 based entities. It was a great tool for modelling, especially in the old days when it wasn't practically possible to write all those deployment descriptors and mapping files by hand. Nowdays with EJB3 and JPA it's not that neccesary, but still convenient as it gives an overview of the structure.
However, I feel that AndroMDA has got stuck since a few years back so I'm looking for an alternative but haven't been able to find any.
The ideal would be if the modelling tool could work directly on the java files. I.e. support both editing the java files directly as well as through the model tool. It doesn't have to be UML but something similar.
I know this isn't directly related to JBoss Tools but in the same area.
Anybody has any suggestions? I use Eclipse and have been looking for tutorials on their EMF but haven't found that much on how to use it for JPA
take a look at Hibernate Diagram Viewer. I do not know what is AndroMDA... Hibernate Diagram Viewer look like something related with your description.
Hibernate Diagram Viewer - is a part of Hirernate Tools (which are in his turn is a part of JBoss Tools). To create diagram you should have Hibernate Console Configuration for your project (Hibernate perspective - new Hibernate Console Configuration) - and popup menu for it -> Mapping Diagram.
Here is look like example:
If you have some enhancements to suggest, please use jira https://jira.jboss.org/jira/browse/JBIDE and this forum https://forum.hibernate.org/viewforum.php?f=6&start=0
Ok, thanks. The mapping diagram could be good enough for the time being, the important is to be able to get a good overview of the structure with all relations between the entities. Maybe it can be used as base for adding edit capabilities on the diagram level.
Haven't been able yet though to figure out how to make it work on an existing project with JPA entities. I get a message that the project has to be a "JPA project" but can't find anywhere to make it so.
Now I've been able to make the mapping diagram work, and although it's useful in visualising how the entities are mapped to the database it's not that much use on visualising the structure of the entities.
In this specific project I have 27 entities, which are related to eachothers. That's still a relatively small project but too much to get an overview of the structure.
I'm not shure how that would help me but maybe I'm missing something.
I create a mapping diagram for my entity Entity1, then I get all the entities Entity1 has direct relations to. Lets say Entity1 has a relation to Entity2 which has a relation to Entity3. The mapping diagram for Entity1 does not show the relation Entity2<->Entity3, which is logical.
Don't get me wrong, I see a use for the mapping diagrams as they visualize the mapping between the entity and the database. However it doesn't help me to get an overview of the whole data model.
I thought your problem was that there were *too many* elements ;)
Select the Configuration node > right click > Open Mapping Diagram - all entities should be shown.
Select all the entities you want to have included and right click, open Mapping Diagram all selected entiteis should be shown.
You most likely just showed *one* entity.
If the above doesn't work as you expect it to (i.e. if there are some associations you believe should be rendered but aren't, please open a bug report in jira!)