ER diagram: room for improvement

Major problems:

1) Massive clutter from mapped super classes

Many projects use a default @MappedSupportClass for entities (usually to declare both "id" and "version" for optimistic concurrency). IDEA represents this relation as a red line between the entity and the mapped super class.
The result is that a number of edges/lines in the diagram is almost doubled, causing a lot of clutter, and a really weird layout.

It would make much more sense to "inline" the properties of a mapped super class into an entity (perhaps using an icon overlay to distinguish between "regular" and "inherited from mapped superclass" ones. At least make it an option - the current diagram is simply unusable for us.

2) Option to enable/disable the display of simple/scalar properties.

Right now, all persistent properties are shown.
The main use of relationship diagram like ER is to provide a "birds-eye" overview of relations between entities.

It would be very useful if one could toggle the display of dumb properties (strings, booleans, numbers, enums).

Imagine a diagram showing only the entity name in the box. Attributes that define relationships to other entities are shown of course, in the form of the edges connecting the nodes. That's what an ER diagram should be. If I want to see the exact type of all properties, I simply look at the .hbm.xml (or the annotated source).

3) Option to display @Embeddables / components "inline"

In a similar fashion, make is possible to show @Embedded / components inline.

We have a number of entities all contain the same embeddable. This is an implementation detail of our O/R mapping.
The current diagram links all those entities to the @Embeddable that they share. This injects an irrelevant implementation detail into the diagram, adding visual distraction while taking away space from the core entities and their relationships.

4) Some cardinality indications on the start/end part of edges would be a nice option.

At the moment I have to mouse hover over an relationship edge to see a tooltip showing this information.

5) On large diagrams I simply can't find what I'm looking for. Zooming out makes the labels unreadable of course :)

Provide Ctrl-F12 to SpeedSearch by entity name. Spring beans graph has this already, most likely there's some opportunity for reuse.

6) Allow anti-aliasing to be turned off.

Apart from making some parts of the diagram sharper, it really boosts scrolling speed. This applies to all diagram type supported by IDEA actually.

In summary: with a modest about of work large usability improvements could be made.

Actually I've hacked some of the above features into the IDEA spring beans diagram last year, with satisfying results. I'm not sure if the ER diagram stuff is on SVN though?

Taras

3 comments
Comment actions Permalink

+1 on all of these

in general, performance of all diagrams (be it Hibernate, Struts, ...) is IMHO still way too sluggish to be of real use - standalone yFiles does not suffer from this problem

0
Comment actions Permalink

So is the code behind the ER diagram available?

I've noticed some graph related stuff in the hibernate plugin, but I'm not sure if it's used for the ER diagram?
At the moment we're using Hibernate with JPA+Hibernate specific annotations.

0

Please sign in to leave a comment.