We have several TMS XData REST servers (Comandline Program) and address them via XDataClient from FMX and web clients.
There is a large number of queries to the data in different ways. Here's an example:
I have a lot of such constructs. Very often with more than 2 tables.
From time to time (in the program life), new data is always added in the form of additional tables.
So it must be very easy to add such new tables / columns to the program.
Table / Entity (TTab_1): TAB_1 = T1_ID, T1_NAME, T1_VALUE Table / Entity (TTab_2): TAB_2 = T2_ID, T1_ID, T2_CAPTION select * from TAB_1 left join TAB_2 on TAB_1.T1_ID = TAB_2.T1_ID
The best thing would be if I got a list of
TList <TMySelectRec> in ServiceFunction of REST-Server
TMySelectRec = record Tab1: TTab_1; Tab2: TTab_2 end;
The entity units are all made with the data modeler. And that now works without manual intervention.
What is the easiest way to do this?
Is it even possible to write a JOIN in the XData URL?
Additional note: Some tables that I use in the JOIN are used by many other master tables.