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

[Entity]
[Table('Invoices')]
[Id('FInvoiceNo', TidGenerator.None)]
TInvoice = class
private
  [Column('InvoiceNo')]
  FInvoiceNo : string;
  //
  [Association]
  [JoinColumn('CustomerNo')]
  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
[Entity]
[Table('Customers')]
[Id('FCustomerNo', TidGenerator.None)]
TCustomer = class
private
  [Column('CustomerNo')]
  FCustomerNo : string;
  [Column('CustomerName')]
  FCustomerName : string;
end;

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: http://www.tmssoftware.com/business/aurelius/doc/web/sub-property_fields.htm