TAureliusDataset questions

Hi!

While using TAureliusDataset I got into some situations that require your attention :slight_smile:

  1. How to assign an entity to a field? I tried using
adsEdit.EntityFieldByName('Customer').AsObject := FManager.Find<TCustomer>(frmSearch.Result.TaxID);

I got no errors, but the field is now empty. I checked frmSearch.Result.TaxID and it's filled correctly and Manager.Find returnt an entity.

  1. How exactly do the Lookup for a sub-entity? Is possible to do it without declarind a field in design time as TLookupField? I like the idea that the fields are created in run-time, but struggle to do the lookup.
  1. Your code is correct, actually. The problem must be somewhere else. Do you have project/steps to reproduce the issue?

  2. You can use Lookup method of the dataset as a regular dataset. You could lookup by a sub property of the sub-entity, mostly the id, for example.