entityManager.createNativeQuery with {h-schema} placeholder

Answered

Hi.

Using IntelliJ IDEA Ultimate 2019.1 

Writing a native jpa Query (Wildfly, Oracle) with db schemas configured via hibernate.default_schema in standalone.xml I wanted to use {h-schema} placeholder

entityManager.createNativeQuery("select * from {h-schema}MY_TABLE");


Running the application the query is working fine, but IJ gives me an "OJ expected, got 'h'" and "hierarchical query clause ... expected" error.
Any way in IDEA how I can deal with this placeholder in IJ more nicely?

Thx.
Rob

1 comment
Comment actions Permalink

There is no such possibility to configure "placeholders" for schema names in query. But you can set the sql dialect to "Generic" for the String.  Then IDE will not complain about invalid syntax for the query:

0

Please sign in to leave a comment.