You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We use Liquibase to create tables used with Hibernate and plain SQL statements.
Currently we use lower case or mixed case identifiers for table/column/sequence names.
This works with OracleDatabase where the DB converts all unquoted identifiers to uppercase names, both on creation with Liquibase and later on access via Hibernate or plain SQL.
It also works with MSSQLDatabase where the (always) quoted identifiers are matched case insensitively in queries.
In HanaDBDatabase you always add quotes to the identifiers (Liquibase 3.x: QUOTE_ALL_OBJECTS; Liquibase 2.x: escapeDatabaseObject) which causes tables/columns/sequences to be created in the unchanged writing (not uppercased by the HANA DB).
When using the same identifiers within Hibernate or plain SQL statements without quotes, they are converted to uppercase and do not match.
Our workaround was to implement HanaDBDatabase#escapeDatabaseObject (we are still using Liquibase 2.x) the same way as for OracleDatabase, causing quotes to be only added for non-word characters or reserved words (which we don't use).
Thus it works the same way as with Oracle Databases (auto-uppercase both by Liquibase and on use in Hibernate and SQL statements).
The text was updated successfully, but these errors were encountered:
We use Liquibase to create tables used with Hibernate and plain SQL statements.
Currently we use lower case or mixed case identifiers for table/column/sequence names.
This works with OracleDatabase where the DB converts all unquoted identifiers to uppercase names, both on creation with Liquibase and later on access via Hibernate or plain SQL.
It also works with MSSQLDatabase where the (always) quoted identifiers are matched case insensitively in queries.
In HanaDBDatabase you always add quotes to the identifiers (Liquibase 3.x: QUOTE_ALL_OBJECTS; Liquibase 2.x: escapeDatabaseObject) which causes tables/columns/sequences to be created in the unchanged writing (not uppercased by the HANA DB).
When using the same identifiers within Hibernate or plain SQL statements without quotes, they are converted to uppercase and do not match.
Our workaround was to implement HanaDBDatabase#escapeDatabaseObject (we are still using Liquibase 2.x) the same way as for OracleDatabase, causing quotes to be only added for non-word characters or reserved words (which we don't use).
Thus it works the same way as with Oracle Databases (auto-uppercase both by Liquibase and on use in Hibernate and SQL statements).
The text was updated successfully, but these errors were encountered: