Is "code" a reserved word in AureliusDataset?

Win10, Delphi 10.4, Aurelius 4.18.0.0, XData 4.17.0.0

I just tried to view data with TAureliusDataset

Here's how I'm loading the dataset:

var
  Client: TXDataClient;
  checkin: Tdtr_check_raw;
  checkLst: TList<Tdtr_check_raw>;
begin

  Client:= TXDataClient.Create;
  try
    Client.URi:='https://abc.xxxxx.com:2021/abc';
    checklSt:= Client.List<Tdtr_check_raw>;
    AureliusDataset1.close;
    AureliusDataset1.SetSourceList(checklst);
    AureliusDataset1.open;
  finally
   Client.free;
  end;

Here's a subset of the Entities

  [Entity]
  [Table('dtr_check_raw')]
  [Id('F_ID', TIdGenerator.IdentityOrSequence)]
  Tdtr_check_raw = class
  private
    [Column('_ID', [TColumnProp.Required, TColumnProp.NoInsert, TColumnProp.NoUpdate])]
    F_ID: Integer;
    
    [Column('code', [], 10)]
    Fcode: Nullable<string>;
    
    [Column('Q1', [])]
    FQ1: Nullable<Boolean>;

You can see that the "code" column is blank.
aurelius_code

If I do something like:

  Client.URi:='https://abc.xxxxx.com:2021/abc';
   checklSt:= Client.List<Tdtr_check_raw>;

   for checkin in checkLSt do
      memo1.Lines.Add( checkin.code );

Then the memo displays all the code values as expected.

So - is there something magic about a column/field called "code'?

Hi Ed, yes, the magic is that it's a string. :wink:

The problem is that TXDataClient, by default, manages all objects it loads from the server.

You are destroying it in the finally section of your code, thus destroying all your Tdtr_check_raw instances. Since string is a manage type, it's cleared. The other data you are seeing is just memory garbage.