I am attempting to synchronize my ERD/class diagram to JPA using VP-UML. It seems to work fine with one exception:
- Sequence generation doesn’t use the sequence generator on the ID column in db, it seems to always just prefix the table name with “seq_”
This is a problem because we are using an Oracle database and VP-UML is stopping us from synchronizing because the generated sequence column is greater than 30 characters (error is ;Table “X” will create a sequence called “seq_X” which is more than 30 characters’) This happens even when we define a sequence generator on the column. Is there a way to enable VP-UML to use the default sequence generator rather than creating it’s own?
Thanks for your message. Our engineers are looking into the problem and will let you know once there are any news.
We have deployed a new build which fixed the generate sequence problem. By defining the key for the sequence, the sequence will be generated using your name instead of the default SEQ_%tablename%. You can download the latest build (VP Suite 4.0) at the following link. Feel free to contact me if you need any help.
That’s great! Thanks for your help. I’ve downloaded the patched version and it works great.
We are really impressed with this tool, it comes the closest to generating ORM mapping that we’ve seen (and we’ve tried quite a few!). Our evaluation is going very well.
There is one last thing that is standing in our way here for full end-to-end modelling w/ JPA (which would be a very nice thing on our current projects and others going forward) - we use Kodo for our JPA persistence provider. It seems that the Java classes contain hibernate-specific JPA annotations (even where there is an equivalent standard JPA annotation). For instance:
- sequence generation (uses @org.hibernate.annotations.GenericGenerator where there is an equivalent @SequenceGenerator annotation that is almost identical with the exception of the strategy parameter which is placed in the @GeneratedValue instead)
- cascades (uses @org.hibernate.annotations.Cascade where this can be placed on the association mapping)
Is there a way to disable this? Better yet, is there a way to generate standard JPA rather than hibernate-specific?
Thanks again for your help.
At the moment we only support hibernate, but we will support standard JPA in the future release.
Feel free to contact us if you need any help.