`@Query` doesn't escape reserved keywords
Expected Behavior
If a method is annotated with @Query, I would expect the query to escape reserved keywords. For example:
@Query("update user set locked=true where id=:id")
void lock(Long id);
user is a reserved name in PostgreSQL.
Actual Behaviour
The user table is not escaped. Even if you use the following query:
@Query("update \"user\" set locked=true where id=:id")
void lock(Long id);
The converted query removes escaping.
Steps To Reproduce
No response
Environment Information
No response
Example Application
No response
Version
4.6.2
@dstepanov @radovanradic maybe we could create a dictionary of reserved words per dialect
We don't want to parse queries more than we do now (just to replace binding). If you use a custom query, you should be doing escaping; I'm not sure why, in this case, the escaping disappears.
@melix I cannot reproduce your issue https://github.com/micronaut-projects/micronaut-data/pull/2900
Closing it because I cannot reproduce it