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?