Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DB-Identifiers are always quoted and are thus case sensitive #16

Open
pichlerm opened this issue May 16, 2018 · 0 comments
Open

DB-Identifiers are always quoted and are thus case sensitive #16

pichlerm opened this issue May 16, 2018 · 0 comments

Comments

@pichlerm
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant