Automatically quote/modify if keywords are used as identifiers

Description

Currently, at least using Oracle 12c Dialect, table names are not automatically quoted (or escaped/modified in any other way for that matter) if keywords are used as name for the respective @Entity class.

Manually quoting using @Table(name ="...") is a bit cumbersome, especially if the relevant keyword is not a keyword in all supported databases (e.g. level is keyword in Oracle, but not in PostgreSQL), since then the identifier has to be quoted on every query on every database system, regardless whether it is a keyword in that particular database system or not (see the "level" example from before).

Therefore I would propose to introduce some automatic escaping/modifying of identifiers if they happen to be a keyword on the particular database system.

OpenJPA for example, appends a 0 (as in Zero) in this case, still sticking to the level example this would lead to a unquoted Level0 on Oracle, while on PostgreSQL it would be Level.

Environment

None

Assignee

Unassigned

Reporter

Juri Berlanda

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Affects versions

Priority

Major
Configure