Oracle schema name sensitivity

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
Eric_08
Posts: 19
Joined: Wed 11 Jul 2018 21:50

Oracle schema name sensitivity

Post by Eric_08 » Mon 13 May 2019 16:32

I'm connecting to an Oracle 12.1 database where schema name is all upper-case characters. In .NET core with EF core code, I use

Code: Select all

modelBuilder.HasDefaultSchema(<schemaName>);
method. If I specify schema name as all uppercase in .NET code, DevArt driver generates SQL statement like this:

Code: Select all

SELECT "t".ID
FROM <schema name>.<table name> "t"
However, if I specify at least one lower-case letter in schema name, it generates the statement where schema name is in double quotes, which apparently makes it case sensitive.

Code: Select all

SELECT "t".ID
FROM "<schema name>".<table name> "t"
I don't quite understand why it's not putting double quotes in one case, but then putting quotes in another case. I want schema name being without double quotes in all cases, which would make it case-insensitive. Is there a way to do that?

Thanks,
Eric

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

Re: Oracle schema name sensitivity

Post by Shalex » Tue 14 May 2019 12:51

Upper case is a default case in Oracle, so unquoted name is treated as the name with all upper case characters. If at least one character is in lower case, the name should be quoted.

As a workaround, set config.Workarounds.DisableQuoting=true; in your EF Core code. Refer to https://www.devart.com/dotconnect/oracl ... tions.html.

Eric_08
Posts: 19
Joined: Wed 11 Jul 2018 21:50

Re: Oracle schema name sensitivity

Post by Eric_08 » Wed 15 May 2019 20:26

That did the trick.

Thanks,
Eric

Post Reply