I've been working a little with the EJB3 persistence support features (ER Diagram and Generate Persistence Mapping) and kind of find them coming up short. It could just be that I haven't figured out how to use these features, but after three days of experimenting with this stuff its probably time to ask a few questions.
Aside from drawing boxes and lines between them the ER Diagram doesn't really seem to do very much. If this is all there is to it I'm not sure this is even a feature worth having. Am I missing something? Is there some way to edit the entities or their relationships or create new relationships between entities with this screen?
The Generate Persistence Mapping is somewhat better, but why is it just a one shot deal? I'm working against a schema that has a life of its own and it would be much nicer if I could refresh the schema and update my persistence mappings without obliterating everything I've already done. Maybe I'm missing how it's done again, but do I really have to remap all my relationships each and every time I generate the mapping? Why can't the tool figure it out from what it's already generated before?
My colleague uses MyEclipse and it seems like they've got this figured out. It uses foreign keys to establish the entity relationships automatically. The generator creates Abstract classes that you extend with our own code (thus avoiding issues with refreshing from the db and obliterating any of the code you write on top of the entites). Why can't the IDEA persistence stuff be more like this? Am I missing something?