Hibernate sql query specifics

Answered

Hi,

in one of my projects we are using MySQL and Hibernate and have queries like this:

I'm editing the sql queries with the MySql query with language injection / mysql dialect, but I get an error because "{c.*}" is not valid sql. Hibernate needs this to expand it and put the fields into the Customer class. The feature is described here: https://docs.jboss.org/hibernate/orm/3.3/reference/en/html/querysql.html

Is there a way to make IDEA aware of the Hibernate special syntax, a special dialect for example?

Thanks!

0
2 comments

Please configure and enable the pattern for this custom user parameter in Settings(Preferences) | Tools | Database | User Parameters settings. E.g. it should work with the "\{[^\}]*\}" pattern.

0
Avatar
Permanently deleted user

Andrey Dernov: thanks for the quick help!

0

Please sign in to leave a comment.