Because of a mix between ORM tools we need a layer of abstraction between our code and the JPA entitymanager.
But because of this IntelliJ does not recognize JPQL query strings.
In the attachment, I added the first 3 lines using the entitymanager directly. The lines below are the normal code we use. As you can see, highlighting (and also code completion) in the direct call works, while in the other line it doesn't.
Is there a way to tell IntelliJ how it can detect JPQL queries in strings?
This works as a charm!!
The only problem with it is that although the settings are under "Project Settings", they end up in the IDEA configuration folder instead of the project folder making it harder to share this configuration for the project