Disable quoted identifiers in CodeFirst

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
ebickle
Posts: 2
Joined: Wed 31 Oct 2012 22:27

Disable quoted identifiers in CodeFirst

Post by ebickle » Thu 01 Nov 2012 16:16

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.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Disable quoted identifiers in CodeFirst

Post by Shalex » Thu 08 Nov 2012 09:26

ebickle wrote:we've disabled all database generation from Code First, and we're using it as a pure code-based ORM layer only.
ebickle wrote:We isolated one of the issues to a property named "Number" which is a reserved word in Oracle
As we understood, the "Number" column was created by your Oracle team (not by our provider).
ebickle wrote:I'd check and see if there are any other potential problems from disabling quoting.
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.
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.

Post Reply