-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: generate UML from hibernate mapping files
PostPosted: Wed Feb 09, 2005 10:21 am 
Regular
Regular

Joined: Mon Sep 20, 2004 8:42 am
Posts: 58
Location: Boston, US
I would like to generate a class diagram of my domain classes from existing code, but the problem is that associations are declared as collections like List or Set and hence UML tool's cannot recognize that say, the Company class has a 1-n relationship with the User class since the user collection is declared as a Set member.

Hopefully when I move the J2SE 5.0 I can find some UML tools that are able to recognize relationships with the typed collections.

The hibernate mapping file seems to be the source that captures type information of associations so it would be possible for UML tools to correctly reverse engineer class diagrams from this. Does anyone know of such a tool.

Note that I'm just using the reverse engineered UML for documentation purposes as opposed to first creating a UML and then coding. I think the latter approach is impractical as the speed of developing code quickly outmatches that of updating the class diagrams.

Thanks,
Sanjiv


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 10, 2005 8:36 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
I am not aware of any direct approaches that currently exist. The Hibernate 3.x tools approach would make this quite possible so maybe an enhancement request to JIRA might be in order. Just don't expect it to soon.

For the moment, I would try generating your schema from the HBMs then use Middlegen to generate the XMI files (hence UML diagrams) from the datebase.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 11, 2005 5:50 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
we definitly would accept any contribution that generates UML, ER, graphs, datadictionaries etc. from a hibernate mapping model....it is one of the goals for the new toolset to be able to make such stuff easy accessible from the code and mappings you have already written ,)

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.