I'm working on a project where we have a manually created Oracle database connected to .NET using a "Code First" configuration. In this specific scenario, we've disabled all database generation from Code First, and we're using it as a pure code-based ORM layer only.
For the sanity of our Oracle team, we do not want to use "quoted" table or field names - they require the ability to query the database without being forced to use quotes forever. By default, the dotConnect for Oracle entity driver wraps all identifiers in quotes.
I tried setting Workarounds.DisableQuoting = true on OracleEntityProviderConfig, but we encountered some problems. We isolated one of the issues to a property named "Number" which is a reserved word in Oracle, but I thought I'd check and see if there are any other potential problems from disabling quoting.
Disable quoted identifiers in CodeFirst
Re: Disable quoted identifiers in CodeFirst
ebickle wrote:we've disabled all database generation from Code First, and we're using it as a pure code-based ORM layer only.
As we understood, the "Number" column was created by your Oracle team (not by our provider).ebickle wrote:We isolated one of the issues to a property named "Number" which is a reserved word in Oracle
config.Workarounds.DisableQuoting disables quoting all identifiers in all queries and commands. If identifier is not quoted, Oracle treats all its letters in the upper case.ebickle wrote:I'd check and see if there are any other potential problems from disabling quoting.
So the query will fail if any letter in the quoted identifier at the database side is in lower case (or the name of identifier is a key word) but dotConnect for Oracle generates non-quoted identifier. It is save to use config.Workarounds.DisableQuoting if there are no quoted identifiers in the database itself.