DataLoadOptions weird behaviour

DataLoadOptions weird behaviour

Postby xxxyyy78 » Wed 08 Sep 2010 16:37

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.
xxxyyy78
 
Posts: 1
Joined: Wed 08 Sep 2010 16:28

Postby ketchup » Thu 09 Sep 2010 13:30

I have got the same problem and this is very weird behaviour.
However I don't have this problem with Microsoft Linq.
ketchup
 
Posts: 11
Joined: Thu 09 Sep 2010 13:25

Postby StanislavK » Thu 09 Sep 2010 16:34

We've reproduced the issue. We will investigate it and inform you about the results.
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Postby ketchup » Mon 13 Sep 2010 18:16

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.
ketchup
 
Posts: 11
Joined: Thu 09 Sep 2010 13:25

Postby StanislavK » Tue 14 Sep 2010 15:26

We have fixed this issue, the fix will be available in the nearest build, which we plan to release this week.
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Postby ketchup » Tue 21 Sep 2010 06:42

Did you release build with this fix? Where we can download it, we have access to http://secure.devart.com ....
ketchup
 
Posts: 11
Joined: Thu 09 Sep 2010 13:25

Postby StanislavK » Tue 21 Sep 2010 11:10

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
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Postby StanislavK » Fri 24 Sep 2010 16:53

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
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Issue not fixed

Postby bmarotta » Thu 30 Sep 2010 20:30

This issue is not fixed or it added a new bug.

Please check post:

http://www.devart.com/forums/viewtopic.php?t=19126
bmarotta
 
Posts: 34
Joined: Wed 29 Sep 2010 11:27

Postby StanislavK » Mon 04 Oct 2010 15:09

We have answered you in this topic:
http://www.devart.com/forums/viewtopic.php?t=19126
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48


Return to dotConnect for Oracle