ORA-01790

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Thu 29 Oct 2009 07:59

Enabling typed nulls causes some performance loss, but it is negligible.
Please note that previous versions contained only enabled typed nulls.
But this does not cancel the problem, so I ask you to send us a small test project illustrating the problem
causing 10 times performance loss.
Please include the script of DB objects used in the project and specify the full version of the database
server you are using.

PeterS
Posts: 2
Joined: Fri 30 Oct 2009 13:57

Tried TypedNulls=true

Post by PeterS » Fri 30 Oct 2009 14:07

AndreyR wrote:This problem is associated with the fact that we have changed the behaviour associated with
typed Nulls in Oracle. The change was caused by the Charset mismatch problems in some situations.
To fix the issue you should set Devart.Data.Oracle.Entity.OracleEntityProviderServices.TypedNulls
to true before the query is executed.
Andrey,

I still have one of the mentioned problems.. with build 5.25.44 I encounter a ORA-1790, using typednulls=true is setting me back to the "Charset mismatch" ORA-12704 error. (like I had with older versions).

(fyi: the error occurs when having more than 1 one-to-many includes. Multiple many-to-one or one-to-one associations do not raise exceptions)

Do you already have a solution for this problem?
Loading references by hand as mentioned by Tom Wilkinson is not the correct way to solve this. As a workaround this is ok, but I really need the includes to work.

Peter

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Fri 30 Oct 2009 15:18

I recommend you to enable or disable typed nulls in correspondence with the current query.

PeterS
Posts: 2
Joined: Fri 30 Oct 2009 13:57

Post by PeterS » Fri 30 Oct 2009 15:29

Andrey,

So you are suggesting to execute multiple queries to get the desired result (typed nulls on/off)? In my opinion that's just working around the problem.

Can you give me a hint why the exceptions occur?
I can't see why the provider should behave different from the Ms Sql one.

And a final question: This is not considered a bug?
If this can't be resolved, I'll just have to workaround the problem as long as we're using EF + Oracle!

Peter

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Mon 02 Nov 2009 11:02

This is Oracle-specific Entity Framework v1 problem. Entity Framework v2 (it will be available in the beginning of the next year) will contain Lazy Loading support, so there will be no need to use Include.
Oracle has a specific bug associated with the wrong column type determining in complicated UNION queries. An example is available here:
http://forums.oracle.com/forums/thread. ... dID=948685
As a EF v1-specific workaround in case you are using multiple Includes and encountered the problem, use typed nulls:

Code: Select all

Devart.Data.Oracle.Entity.OracleEntityProviderServices.TypedNulls = true;
But in this mode in some cases can arise another problem associated with type inconsistency, for example, character-typed NULL will be generated as TO_CHAR(NULL) and the binary NULL as TO_BLOB(NULL), etc.
If you are using Oracle+EFv1 then try minimizing Include number, making maximum 1 Include and loading the associated entities explicitly using Load. In the other case be ready to test your application in particular case using your table set and queries because of possible type incosistencies.
Our LINQ to Oracle users don't have these problems, it has both multiple Include support and Lazy Loading.

huntchen
Posts: 4
Joined: Thu 29 Apr 2010 16:09

Post by huntchen » Thu 29 Apr 2010 16:30

Dear Andrey:
I have the same problem about multiple include.
After i set"Devart.Data.Oracle.Entity.OracleEntityProviderServices.TypedNulls = true;"
I got error "ORA-12704: character set mismatch",
I also read the post (http://www.devart.com/forums/viewtopic.php?t=15451),and found the problem is "TO_CHAR(NULL) AS C5",correct is (for example) "TO_NCHAR(NULL) AS C5"

My question is,have any setting can change query string let TO_CHAR(Null) --> TO_Nchar(Null)

My dotConnect for Oracle Version is 5.60.120.0,and I think because I have NVarchar2 data type...

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Fri 30 Apr 2010 12:42

We are investigating the Nvarchar issue.
I will let you know about the results.

huntchen
Posts: 4
Joined: Thu 29 Apr 2010 16:09

Post by huntchen » Fri 30 Apr 2010 16:29

Thanks a lot... :D

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Tue 01 Jun 2010 12:42

We have added a workaround in the latest build of dotConnect for Oracle.
You can now use the following code before executing the query that caused the problem:

Code: Select all

Devart.Data.Oracle.Entity.OracleEntityProviderServices.StringCastFormat = "TO_NVARCHAR({0})";

huntchen
Posts: 4
Joined: Thu 29 Apr 2010 16:09

Post by huntchen » Wed 02 Jun 2010 11:12

thanks...I got it..I will try it... :D

huntchen
Posts: 4
Joined: Thu 29 Apr 2010 16:09

Post by huntchen » Fri 04 Jun 2010 06:40

the code should be set as..

Devart.Data.Oracle.Entity.OracleEntityProviderServices.StringCastFormat = "TO_NCHAR({0})";

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Fri 04 Jun 2010 13:14

Thank you for sharing your knowledge.

midnit
Posts: 10
Joined: Tue 23 Mar 2010 19:50

Post by midnit » Tue 06 Jul 2010 18:35

I am using EF v2 (.NET 4) and still require:

Devart.Data.Oracle.Entity.OracleEntityProviderServices.TypedNulls = true;

I thought this wasn't needed in EF v2 (.NET 4)?

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Wed 07 Jul 2010 15:34

The default behaviour is still to use untyped nulls.

mmartin
Posts: 2
Joined: Mon 26 Jul 2010 06:26

Post by mmartin » Mon 26 Jul 2010 07:01

Hi,

we did the thing with "OracleEntityProviderServices.TypedNulls = true" and it solved some issues, nevertheless, there are still cases where we receive the ORA-01790 error, if we append more than one 'Include' to the Entity-Query.

Due to our requirements we are not allowed to use .Net 4.0 and have to stick with the 3.5 Version.

Is there anything else we can do to avoid this issue?

Thanks,

M. Martin

Post Reply