Implement a Query with Join

Hello Flavio,

You can simply create a class TMovimentDetail with an association to TMovimentMaster:

TMovimentDetail = class
  FMaster: TMovimentMaster;

then do a search on MovimentDetail using your criteria:

Details := Manager.Find<TMovimentDetail>.
  Where(Linq[‘descrizione’]  = ‘TEST’ or Linq[‘descrizione’].IsNull)

Then you can get the master using the association:

for Detail in Details do
  Detail.Master // use master here

Hello Wagner,
Thanks for your explanations, another questions... how can I upload Datails in a TAureliusDataset?
Thanks in advance

What do you mean by upload? Do you want to list the Details? In this case just use one of available AureliusDataset methods, for example SetSourceList and pass the Details list to it.

Sorry, I did not understand, can you give me an example code?


Here is the link of documentation that explains how to provide objects to the Aurelius Dataset:

More specific topics are:
from customer
  left join address on (address.cutomerid = customer.customerid) and (address.preference = True)
  left join phone on (phone.customerid = customer.customerid) and (phone.preference = True)
I want only dataset and only one DBGrid to show.

Thank you 

What is your declaration and mapping of the classes involved in that SQL?