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. |