Linq issue with certain complex da schema query

Does RO/DA SDK build 1628.3 still contain an issue with linq?

I get this error

He should be taking this query

WITH vRekeningTotalen
AS (SELECT kor_rek_primkey,
COALESCE(Sum(kor_AantalVrk),0) AS TotaalAantalVrk, COALESCE(Sum(kor_Totaal),0) AS Totaal,
COALESCE(Sum(kor_kortBtw1),0) AS TotaalBTW1, COALESCE(Sum(kor_kortBtw2),0) AS TotaalBTW2,
COALESCE(Sum(kor_kortBtw3),0) AS TotaalBTW3, COALESCE(Sum(kor_kortBtw4),0) AS TotaalBTW4
FROM Rekening
LEFT JOIN Korting ON kor_rek_Primkey=rek_primkey and kor_Status=0 --alleen de nog niet gereleasede
GROUP BY kor_rek_primkey)

SELECT
rek.rek_primkey, rek_Datechanged, rek_UserId, rek_Naam, rek_typ_primkey, rek_ReleaseVirtueleGrens, rek_ReleaseId, rek_DatumLaatsteRelease,
typ_primkey, typ_datechanged, typ_userid, typ_Omschrijving, typ_Type, typ_ReleaseDatum, typ_ReleaseAantalVrk,
typ_ReleaseBedrag, typ_CardScanNodig,
typ_ReleaseType, typ_VraagVoorRelease, typ_HoudRestbedrag, typ_ReleaseBedragExact, typ_SisCardSupported,
TotaalAantalVrk, Totaal, TotaalBTW1, TotaalBTW2, TotaalBTW3, TotaalBTW4
FROM Rekening rek
LEFT JOIN vRekeningTotalen ON vRekeningTotalen.kor_rek_primkey=rek.rek_primkey
INNER JOIN RekeningType typ ON rek_typ_primkey=typ_primkey
WHERE {Where}

which appears OK in the schema modeler

The query does not appear to arrive in SQL profiler

It is likely a bug on my side.

How can I investigate this issue?

Is there a way find out what goes wrong in SqlMacroProcessor Evaluate?

I did not get any wiser myself by looking at te RO code.

The exception is thrown before the command is sent, which is why nothing reaches SQL Profiler. The statement contains a {Name} that DA could not resolve.
Line 1, column 1 is the position inside the braces.

To get the name, add this to the service constructor:

this.UnknownSqlMacroIdentifier += (sender, e) =>
{
    logIf.Log("Unknown SQL macro: " + e.Identifier);
    e.Processed = false;
};

there is nothing wrong with LINQ in this build

Thanks, I was able to debug and find my issue using this event.

There is indeed nothing wrong with LINQ in this build :wink: