| To clarify... Hibernate treats both double-quote and back-tick as quoting characters in mappings. Both cases will get converted via the Dialect to database-specific quoting. Back-ticks just happen to be the Hibernate-specific way to specify this. That pre-dates JPA and is unquestionably easier to write (otherwise you have to escape the double-quotes). In terms of HBM mappings, I believe double quotes are also allowed:
<class ... table="\"role\"">
and of course back-ticks work:
<class ... table="`role`">
As Gail said, if you have a situation where this fails then please upload a test and we can look at specifics. But as is we will have to reject this issue. And to be clear, you have to tell Hibernate to quote this. In some way. Either specific to these usages, or using global quoting or using Hibernate "auto quote reserved words" feature (which is still incubating) |