Additional hibernate annotations with ORM mapping

I’m evaluating VP-UML.

I’ve used MagicDraw in the past and hoping that I can take advantage of the ORM capability of VP-UML. However, we have a requirement to be able to use hibernate annotations that don’t seem to be supported by the ORM part of VP-UML.

For instance we use a custom ID generator and some custom types. We also use the validator framework (@Min, @Length, etc). The way we did this with MD was to just use roundtripping with Java classes. Would I have to do the same with VP-UML?

Thanks,
Martin

Hi Martin,

I will discuss with our developers and then come back to you.

Best regards,
Jick

Hi Martin,

We support custom ID generator. Here is an outline of steps:

  1. Create a class
  2. Stereotype it as ORM ID Generator
  3. From the specification dialog of the column that require specifying ID generator, select the class as the ID generator
  4. Generate ORM code
  5. Implement your ID generator

I captured a movie to show you how to do this. Please watch at:
http://files3.visual-paradigm.com/200706/Jick/id-generator.html

The length of column will be included in the annotation. please see the attached image for detail.

Hope this helps. Please feel free to let me know if there are any questions.

Best regards,
Jick
entity.png

So there is no way to support other annotations? We also use @SqlResultSetMapping and @NamedSqlQuery. Too bad the roundtripping support for classes doesn’t work for the ORM piece too. I understand why that would be hard.

So, I’m assuming at this point that I’ll have to forgo the ORM capabilities for now and just use the class diagram roundtripping features.

Thanks,
Martin

Hi Martin,

I already passed your feedback onto our team. Will let you know once there is any feedback.

Best regards,
Jick