Page 1 of 1

DataLoadOptions weird behaviour

Posted: Wed 08 Sep 2010 16:37
by xxxyyy78
When I create first instance of my DataContext I use DataLoadOptions to load children elements (Orders). On the next step I create second instance of datacontext and new DataLoadOptions using DataLoadOptions as before with added second children collection (OrderDetails).
In the first case collection is loaded with desired data, but in the second case only first collection is filled out but the second one remains empty.

Note that HasLoadedOrAssignedValues property is not always set to true despite there are some data in the collection.

Example:

Code: Select all


            MyOracleDataContext  db1 = new MyOracleDataContext();
            db1.DefferedLoadingEnabled = false;
            DataLoadOptions opts1 = new DataLoadOptions();
            opts1.LoadWith(p => p.Orders);

            db1.LoadOptions = opts1;

            var q1 = (from p in db.Customers
                    select p).ToList();


            MyOracleDataContext  db2 = new MyOracleDataContext();
            db2.DefferedLoadingEnabled = false;
            DataLoadOptions opts2 = new DataLoadOptions();
            opts2.LoadWith(p => p.Orders);
            opts2.LoadWith(p => p.OrderDetails);

            db2.LoadOptions = opts2;

            var q2 = (from p in db2.Customers
                    select p).ToList();
Variable q2 loads only customer orders, but orderdetails are empty.
It looks like datacontext remeber the last DataLoadOptions for the same query extended with loading orderdetails collection.

Posted: Thu 09 Sep 2010 13:30
by ketchup
I have got the same problem and this is very weird behaviour.
However I don't have this problem with Microsoft Linq.

Posted: Thu 09 Sep 2010 16:34
by StanislavK
We've reproduced the issue. We will investigate it and inform you about the results.

Posted: Mon 13 Sep 2010 18:16
by ketchup
And what do you think about this? Is it a bug and you are looking for a solution or do we do something incorrect? Please inform us because solution for this problem is crucial for our architecture.

Posted: Tue 14 Sep 2010 15:26
by StanislavK
We have fixed this issue, the fix will be available in the nearest build, which we plan to release this week.

Posted: Tue 21 Sep 2010 06:42
by ketchup
Did you release build with this fix? Where we can download it, we have access to http://secure.devart.com ....

Posted: Tue 21 Sep 2010 11:10
by StanislavK
We will release this build in several days. It will be available in Registered Users' Area and at the Download page of our site (the trial version only):
http://www.devart.com/dotconnect/oracle/download.html

Posted: Fri 24 Sep 2010 16:53
by StanislavK
We have released the new 5.70.170 build of dotConnect for Oracle. The build can be downloaded from
http://www.devart.com/dotconnect/oracle/download.html
(the trial version) or from Registered Users' Area (provided that you have an active subscription):
http://secure.devart.com/

The detailed information about the fixes and improvements implemented in dotConnect for Oracle 5.70.170 is available at
http://www.devart.com/forums/viewtopic.php?t=19068

Issue not fixed

Posted: Thu 30 Sep 2010 20:30
by bmarotta
This issue is not fixed or it added a new bug.

Please check post:

http://www.devart.com/forums/viewtopic.php?t=19126

Posted: Mon 04 Oct 2010 15:09
by StanislavK
We have answered you in this topic:
http://www.devart.com/forums/viewtopic.php?t=19126