-
1. Re: Modelling tool for JPA - Suggestions?
vyemialyanchyk Nov 5, 2009 8:36 AM (in response to sverker)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:
https://jira.jboss.org/jira/browse/JBIDE-5124
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 -
2. Re: Modelling tool for JPA - Suggestions?
ochikvina Nov 5, 2009 9:36 AM (in response to sverker)To sverker: See also the docs about Mapping Diagram: http://download.jboss.org/jbosstools/nightly-docs/en/hibernatetools/html_single/index.html#d0e2407
Navigate to 4.10.1.1. Mapping Diagram section. -
3. Re: Modelling tool for JPA - Suggestions?
maxandersen Nov 6, 2009 7:07 AM (in response to sverker)Short answer, no - I don't have any good recommendations for a two-way UML/model editing plugin.
The closest we got for your usecase is the Hibernate Mapping diagram mentioned here which is just one-way readonly view of how the mapping model looks like. -
4. Re: Modelling tool for JPA - Suggestions?
sverker Nov 6, 2009 7:14 AM (in response to sverker)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. -
5. Re: Modelling tool for JPA - Suggestions?
maxandersen Nov 6, 2009 7:40 AM (in response to sverker)the diagram viewer does not need th eproject to be JPA enabled. It just needs a hibernate console configuration which either points to java project or you configure the classpath manually.
-
6. Re: Modelling tool for JPA - Suggestions?
sverker Nov 7, 2009 4:20 PM (in response to sverker)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. -
7. Re: Modelling tool for JPA - Suggestions?
maxandersen Nov 9, 2009 4:50 AM (in response to sverker)In latest builds you can hide/show the elements you don't want. Does that help you ?
-
8. Re: Modelling tool for JPA - Suggestions?
sverker Nov 9, 2009 4:57 AM (in response to sverker)Hi Max,
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. -
9. Re: Modelling tool for JPA - Suggestions?
maxandersen Nov 9, 2009 5:48 AM (in response to sverker)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.
or
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!)
Thanks! -
10. Re: Modelling tool for JPA - Suggestions?
sverker Nov 9, 2009 6:18 AM (in response to sverker)Ah, that's more like it. At least it gives the overview although a bit messy with too many entities. I can use this for the time being and model by hand until I can find a suitable modelling tool.