LoadWith Option does not work

LoadWith Option does not work

Postby Zero-G. » Mon 07 Jun 2010 14:41

Hey

Using the latest available Version of dotConnect for mySQL.

I have a Mastertable with two related child-tables
So:
-----Mastertable
|----Childtable1
|----Childtable2

Using LoadWith Option like:

Code: Select all
        Dim dl As New Devart.Data.Linq.DataLoadOptions
        dl.LoadWith(Of VOptNeuContext.Tagesabschluss)(Function(c) c.Tagesabschlussdetails)
        dl.LoadWith(Of VOptNeuContext.Tagesabschluss)(Function(c) c.Tagabkrankenkassenanteils)
        myDataContext.LoadOptions = dl


Does not work as expected, the "Tagesabschlussdetails" will be translated with a join, but "Tagabkrankenkassenanteils" is translated with a stand alone Select.
Please try to reproduce and let me know, why this happens.

THX
Zero-G.
 
Posts: 390
Joined: Sat 09 Dec 2006 12:20

Postby AndreyR » Wed 09 Jun 2010 15:29

Sorry, but this is a designed behaviour. The second join leads to performance loss, we have already discussed this behaviour with our users here, for example:
http://www.devart.com/forums/viewtopic.php?p=51466
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16


Return to LinqConnect (LINQ to SQL support)