Accessing Entity Field data in Dataset

I have a TInvoice class which contains an invoice number as an id and a customer field as shown below

[Id('FInvoiceNo', TidGenerator.None)]
TInvoice = class
  FInvoiceNo : string;
  FCustomer : TCustomer;

When I get a list and load it to aurelius dataset am unable to access the customer data, how does one go about doing this?

I.e. Dataset.FieldByName('Customer.CustomerName').asstring;

You must previously create those fields as persistent fields before opening the dataset. TAureliusDataset doesn't create such subproperty fields by default.

The TCustomer class is also a persistent class looking like
[Id('FCustomerNo', TidGenerator.None)]
TCustomer = class
  FCustomerNo : string;
  FCustomerName : string;

So my question is after getting an object list of invoices, how can I access the customer data fields e.g.
Customer.CustomerNo or Customer.CustomerName.

As I mentioned before, you must create persistent fields in the dataset with those names "Customer.CustomerName". See: