today I started to test EntityDAC + Delphi 10 Seattle. I managed to create a sample model with Entity Developer, included the generated files into my project and set up all necessary components to establish a connection:
• TEntityConnection (ProviderName = IBDAC)
• TIBDACDataProvider
• TEntityXMLModel
• TEntityContext
• TEntityDataSource
• TEntityDataSet
In Delphi I created a form with one button that performs the following code:
Code: Select all
procedure TForm2.btnOpenClick(Sender: TObject);
var
query : ILinqQueryable;
dataContext : TDataContextTest;
myObject : IMyObject;
begin
dataContest := TDataContextTest.Create(self);
myObject := dataContext.MyObject;
query := From(myObject).Select([myObject.NR, myObject.Date1])
entityDataSet1.SourceCollection := entityContext1.GetEntities(query);
entityDataSet1.Open;
end;
The problem is, that Interbase 2009 (Dialect 1) does not accept the keyword AS for tables. You can use aliases but without AS (SELECT x.nr FROM tableA x)SELECT t1.nr AS nr, t1.date1 AS date1 FROM tableA AS t1;
So, I need to prevent Linq from using it, so that the SQL will look like this:
or without AS at allSELECT t1.nr AS nr, t1.date1 AS date1 FROM tableA t1;
SELECT t1.nr nr, t1.date1 date1 FROM tableA t1;
Any suggestions?