It is simple,
As an an example: (dummy example)
A table: Name:String / Quantity:Integer / Price:Float
The client application wants to display a table with : Name, Quantity, Price, AND Total:Float (Total = Quantity * Price)
The client application is stupid. The client can only show
The client can use automatic CRUD, but I can also make a service endpoint.
I usually get a TList<TMyEntity>
.
But there are only Name,Quantity,Price
included.
I'm looking for a quick solution to extend this list with a field/column that is calculated on the server.
And here are the two questions
- Where and how to calculate the value (an event in XDataServer or an event in Aurelius)
- How to transfer the extended list most easily
Currently I have simply extended the entity with the desired fields (also in the database) and calculate the values in Aurelius with OnInserting/OnUpdating. But I really didn't want to add these fields to the database.
Is there another, simpler solution?