Page 1 of 1

LoadWith Option does not work

Posted: Mon 07 Jun 2010 14:41
by Zero-G.
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

Posted: Wed 09 Jun 2010 15:29
by AndreyR
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