Page 1 of 1

Invalid node type exception

Posted: Sun 20 Dec 2015 16:10
by AudioPat
Hi people,


When i try to filter a IEntityEnumerable.where(statement) list a exception is throwed.(TSqlExpressionCalculator): Invalid node type { 46 }

Code: Select all

 var
    LCList: IEntityEnumerable<TContainer>;
    LCListFiltered: IObjectEnumerable<TContainer>;
    LWhere: string;
    LContainer: TContainer;
Begin
    LCList  := GetEntities;
    LWhere := '(Container.Aanduiding.Contains(''%' + edtContainerAanduiding.text + '%''))' +
            ' and (Container.ContainerNummer.Contains(''%' + edtContainerNummer.text + '%''))';   
   
    LCListFiltered := FCList.Where(LWhere);

    for LContainer in LCListFiltered do // Exception here...
    begin
        ....
    end;
End;
How to filter a list correctly?

Thanks for help.

Re: Invalid node type exception

Posted: Tue 22 Dec 2015 10:42
by AlexP
Hello,

We can't reproduce the issue on the latest EntityDAC version 1.4.7. Try to reproduce the issue on this version. If the issue repeats, please send us the model files (to support*devart*com), and specify the provider and the IDE version.

Re: Invalid node type exception

Posted: Tue 22 Dec 2015 14:10
by AudioPat
Alex,

Thanks for response.
We try to reproduce the issue in 1.4.7, but the exception is throwed.
We will send the model to the support e-mail.

* Maybe a another bug:
TEntityContext: When change the property cache.enabled to false(design time), a acces validation is triggerd in 'EntityDac210.bpl' in Cache.TCacheManager.Clear.

Tech info:
Delphi XE7
Windows 10 64bit
SQL Server 2014.

Re: Invalid node type exception

Posted: Wed 23 Dec 2015 08:04
by AlexP
Thank you for the sample, we have reproduced the described problem and will investigate the reason for such behavior.