Access the JPA/Hibernate metamodel used for JPQL/HQL language support

Answered

Hey,

I am trying to make use of the JPA/Hibernate metamodel of projects in my plugin but I can't find any information about how to access that.

My goal is to create a language that makes use of the JPA/Hibernate metamodel that is then injected into a annotation.

I guess I also need a JPA Console configuration for such a metamodel to be built? Also, how do I get notified about changes in the metamodel?

2 comments
Comment actions Permalink

It is not open API, so everything may break at any time.

Add dependency on plugin com.intellij.persistence.

Use com.intellij.persistence.util.PersistenceCommonUtil#getAllPersistenceFacets() to obtain all persistence facet for module/project. All exposed information from there should be up-to-date  automatically.

0
Comment actions Permalink

What dependency do I need for that and where to find it? I couldn't find any artifact that might contain that here: https://www.jetbrains.com/intellij-repository/releases

0

Please sign in to leave a comment.