Page 2 of 3

Posted: Thu 29 Oct 2009 07:59
by AndreyR
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.

Tried TypedNulls=true

Posted: Fri 30 Oct 2009 14:07
by PeterS
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

Posted: Fri 30 Oct 2009 15:18
by AndreyR
I recommend you to enable or disable typed nulls in correspondence with the current query.

Posted: Fri 30 Oct 2009 15:29
by PeterS
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

Posted: Mon 02 Nov 2009 11:02
by AndreyR
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.

Posted: Thu 29 Apr 2010 16:30
by huntchen
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...

Posted: Fri 30 Apr 2010 12:42
by AndreyR
We are investigating the Nvarchar issue.
I will let you know about the results.

Posted: Fri 30 Apr 2010 16:29
by huntchen
Thanks a lot... :D

Posted: Tue 01 Jun 2010 12:42
by AndreyR
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})";

Posted: Wed 02 Jun 2010 11:12
by huntchen
thanks...I got it..I will try it... :D

Posted: Fri 04 Jun 2010 06:40
by huntchen
the code should be set as..

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

Posted: Fri 04 Jun 2010 13:14
by AndreyR
Thank you for sharing your knowledge.

Posted: Tue 06 Jul 2010 18:35
by midnit
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)?

Posted: Wed 07 Jul 2010 15:34
by AndreyR
The default behaviour is still to use untyped nulls.

Posted: Mon 26 Jul 2010 07:01
by mmartin
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