DataLoadOption problem
DataLoadOption problem
Hi!
DataLoadOption creates wrong sql querie while using three tables in relation
Parent->Child->Child2
It generates inner join instead of left join.
For example:
DataloadOption lo = new DataLoadOption();
lo.LoadWith(p->Customer)
lo.LoadWith(p=>Adress)
In this example Customer may or may not hold Adress so left join is better than inner join.
We are using dotConnet 1.0.42
DataLoadOption creates wrong sql querie while using three tables in relation
Parent->Child->Child2
It generates inner join instead of left join.
For example:
DataloadOption lo = new DataLoadOption();
lo.LoadWith(p->Customer)
lo.LoadWith(p=>Adress)
In this example Customer may or may not hold Adress so left join is better than inner join.
We are using dotConnet 1.0.42
-
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
I will send you a test project in a letter, please check that it was not blocked by your mail filter.
The expected behaviour for such situation is that the following SQL commands will be executed:
1) a select with 'left outer join' to get master rows and depending child rows;
2) multiple selects with 'where childId = parameter0' to get rows from child2 that are referencing child rows retrieved in the first point.
Such behaviour is designed to prevent performance loss caused by slow multiple outer joins.
Please describe the behaviour you are observing in your environment; if it differs from the expected one, please specify what should be changed in the sample project to reproduce the issue.
The expected behaviour for such situation is that the following SQL commands will be executed:
1) a select with 'left outer join' to get master rows and depending child rows;
2) multiple selects with 'where childId = parameter0' to get rows from child2 that are referencing child rows retrieved in the first point.
Such behaviour is designed to prevent performance loss caused by slow multiple outer joins.
Please describe the behaviour you are observing in your environment; if it differs from the expected one, please specify what should be changed in the sample project to reproduce the issue.
We have investigated the problem again in our environment and it is more complicated then I described yesterday.
It looks that if we have only one level with child tables everything is OK, LEFT outer join is used.
But when we have two level child tables first is left outer join and the second one is inne join.
Example:
DataloadOption lo = new DataLoadOption();
lo.LoadWith(p->Customer)
lo.LoadWith(p=>Adress)
lo.LoadWith(p->Supplier)
lo.LoadWith(p=>ContactDetail)
Now we are trying to reproduce this issue using an example send by you.
It looks that if we have only one level with child tables everything is OK, LEFT outer join is used.
But when we have two level child tables first is left outer join and the second one is inne join.
Example:
DataloadOption lo = new DataLoadOption();
lo.LoadWith(p->Customer)
lo.LoadWith(p=>Adress)
lo.LoadWith(p->Supplier)
lo.LoadWith(p=>ContactDetail)
Now we are trying to reproduce this issue using an example send by you.
-
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
If the problem cannot be reproduced on the sample I've sent, you can specify the definitions of the database objects used in your application, or send us the model with which the problem occurs. If possible, please send us a complete small sample with which the problem can be reproduced.
-
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
-
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
-
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
-
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
We have released dotConnect for Oracle 6 where this issue is fixed. The new build can be downloaded from
http://www.devart.com/dotconnect/oracle/download.html
(the trial version) or from Registered Users' Area (for users with active subscription only):
http://secure.devart.com/
For the detailed information on fixes and improvements available in dotConnect for Oracle 6, please refer to
http://www.devart.com/forums/viewtopic.php?t=19624
http://www.devart.com/dotconnect/oracle/download.html
(the trial version) or from Registered Users' Area (for users with active subscription only):
http://secure.devart.com/
For the detailed information on fixes and improvements available in dotConnect for Oracle 6, please refer to
http://www.devart.com/forums/viewtopic.php?t=19624