Is hibernate annotations supported in SDE for IntelliJ?

We have the SDE professional for Intellij and would like to use hibernate annotations to describe the mapping. Is this supported in SDE professional for IntelliJ?

e.g., can it created annotations like this:

public class Employer implements Serializable {
        cascade={CascadeType.PERSIST, CascadeType.MERGE}
    public Collection getEmployees() {
        return employees;


Hi Chris,

Thank you for your post. You can find the option about annotation at Modeling > ORM > Generate Code…, in the dialog box, select “Annotation” in the drop-down menu of Mapping Type (you can refer to the attached image).

If you have any further inquiries, please feel free to ask.

Best regards,
Lilian Wong


While trying to generate code from my ORM diagram in Intellij 7.0, VP 3.2, I got this error message:

No message
at v.qqa.d(:246)
at v.tpe.d(:379)
at v.iww.fileDeleted(:47)
at com.intellij.openapi.vfs.newvfs.VirtualFileFilteringListener.fileDeleted(
at sun.reflect.GeneratedMethodAccessor153.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at com.intellij.util.PendingEventDispatcher.a(
at com.intellij.util.PendingEventDispatcher.a(
at com.intellij.util.PendingEventDispatcher.access$100(
at com.intellij.util.PendingEventDispatcher$1.invoke(
at $Proxy10.fileDeleted(Unknown Source)
at com.intellij.openapi.vfs.impl.VirtualFileManagerImpl.a(
at com.intellij.openapi.vfs.impl.VirtualFileManagerImpl.access$200(
at com.intellij.openapi.vfs.impl.VirtualFileManagerImpl$1.after(
at sun.reflect.GeneratedMethodAccessor135.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at com.intellij.util.messages.impl.MessageBusConnectionImpl.deliverMessage(
at com.intellij.util.messages.impl.MessageBusImpl.pumpMessages(
at com.intellij.util.messages.impl.MessageBusImpl.sendMessage(
at com.intellij.util.messages.impl.MessageBusImpl.access$000(
at com.intellij.util.messages.impl.MessageBusImpl$2.invoke(
at $Proxy72.after(Unknown Source)
at com.intellij.openapi.vfs.newvfs.persistent.PersistentFS.processEvents(
at com.intellij.openapi.vfs.impl.jar.JarFileSystemImpl$1$1$
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(
at com.intellij.openapi.vfs.impl.jar.JarFileSystemImpl$1$
at com.intellij.openapi.application.impl.LaterInvocator$
at java.awt.event.InvocationEvent.dispatch(
at java.awt.EventQueue.dispatchEvent(
at com.intellij.ide.IdeEventQueue.c(
at com.intellij.ide.IdeEventQueue.b(
at com.intellij.ide.IdeEventQueue.dispatchEvent(
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(
at java.awt.EventDispatchThread.pumpEventsForHierarchy(
at java.awt.EventDispatchThread.pumpEvents(
at java.awt.EventDispatchThread.pumpEvents(

can you please help?


Thank you Lilian… That helped. I am now generating annotations for my ORM Persistable classes, although I notice that the annotations generated are very hibernate specific. Is there a way to specify VP to use standard JPA annotations?

This way we can abstract our POJO objects from the underlying implementation? This way frameworks such as toplink, hibernate, etc all work with the POJO objects created.


p.s. I also get the same error the hvtranho reported, but it does seem to generate the code.

Right, the error message was not related to the problem of code generation. I did choose the wrong option: mapping code instead of POJO. Now I can generate java code with annotation.

It would be nice if only JPA classes are used for annotation.

Best regards,

Hi Chris,

Thank you for your reply. We are sorry that we do not support JPA and we have no plan to support it at the moment.

If you have any inquiries, please feel free to ask.

Best regards,
Lilian Wong

I don’t understand the statement that you have no plans to support JPA. When I look at the generated code, I see annotations from the javax.persistence package. I also see hibernate annotations.

What part of JPA don’t you supprt? Would it be the java.persistence.spi?
Which JPA annotations/interfaces don’t you support?

Hi glm,

Thank you for you post. We indeed have no plan to support JPA, we only support hibernate notations which is using part of JPA.

If you have any further inquiries, please do not hesitate to ask.

Best regards,
Lilian Wong

Hi Lilian,

I don’t understand why you don’t plan to support JPA annotation generation??? :?:

I mean, to put it simple my point is this:

JPA is an accepted Standard in IT/JAVA community! I know a lot of projects that have chosen to develop their Entity-Layer like this, to be independent from the underlying ORM-Layer (Hibernate, Toplink…)
It would be great to have a tool like VP to support such a standard. If you can generate Hibernate Annotations, what is so difficult to write templates that support PLAIN JPA?? Maybe someone should take some time and read the EJB-JPA spec ( [] ). This can’t be so hard… I myself develop a lot of projects using JPA and i have to do a lot of annotating by hand, as VP does not support it :cry:

I own a VP 6.1 Professional license. It would be great if you would change your minds an start developing JPA templates to give them to your paying customers. I even would pay for that kind of feature (to some extend).


Hi Martin,

Thanks for your post. Since our ORM feature is based on Hibernate, which is extended from JPA.

In fact, you can draw EJB classes on Class Diagram, assign “ORM Persistent” as stereotype of the classes and synchronize them to ERD. After that, generate the code by Java round-trip engineering (available in VP-UML/SDE Professional Edition) will get the JPA annotations.

But VP-UML 6.1 may not support generate JPA annotation on Java round-trip engineering. I suggest you download the evaluation version of latest VP-UML from the Download site in our website ( ) so that you can try out the feature.

If there is any further inquiry, please feel free to ask.

Best regards,
Lilian Wong