In a code-first server the TROArray<T> was added. That makes coding much easier. How can we get the interface file that is generated by ServiceBuilder to have the same? I tried with and without the code first checkbox checked.
This is for generating code for a delphi client from a delphi server.
The server project was recently migrated to code first by using the Delphi IDE wizard.
you can’t get TROArray<T> type in _Intf file because this type is generated as TROArray descendant for compatibility with old versions of Delphi.
The Code-First attributes can be generated in code if the Code-First Compatibility checkbox is checked. it will allow to use the same _Impl in RODL- and Code-First-based servers w/o modifying code.
in general, it has no sense because TROArray and TROArray<T> do the same.
Also in _Intf you shouldn’t declare those arrays manually - codegen does it for you.
function ListQuery<TROType; TROArrayType: uROArray.TROArray<TROType>>(const pQuery: String; const pOnResult: TQueryResult<TROType>): TROArrayType;
function TMyClass.ListQuery<TROType, TROArrayType>(const pQuery: String; const pOnResult: TQueryResult<TROType>): TROArrayType;
begin
result := TROArrayType.Create;
while ..... do
result.Add(TROType.Create);
end;
This code works on the server. We want to use this same type of code on the client. Is that possible?