Beginning Aurelius with NexusDB

Just starting out with Aurelius and having problems connection to NexusDB.
I get error " Error in statement unable to resolve the identifier "A.FIRST_NAME" all works fine with native NexusDB components
I see  in other post asking for test project so loaded to BitBucket here:
git clone

some code snips though. I have 2 buttons to load a grid from either  Native or Aurelius.
The main form has an Aurelius connection with properties AdapterName, SQLDialect set to NexusDB setup with wizard.
FConnection, ObjectManager are private var's
The code to load Aurelius:

procedure TForm1.Button2Click(Sender: TObject);
  List: TList<TEmployee>;
  DataSource1.Dataset := AureliusDataset1;
  nxServerEngine1.Active := True;
  nxSession1.Active := True;
  nxDatabase1.Active := True;
  FConnection := AureliusConnection1.CreateConnection;
  ObjectManager := TObjectManager.Create(FConnection);
  List := ObjectManager.Find<TEmployee>.List;
  AureliusDataset1.Active := True;
  [Entity, Automapping]
  TEmployee = class
      FID: Integer;
      FFirstName: String;
      FLastName: String;
      FHireDate: TDate;
      FTerminateDate: Nullable<TDate>;
      FPayRate: Nullable<Currency>;
      property ID: Integer read FID write FID;
      property FirstName: String read FFirstName write FFirstName;
      property LastName: String read FLastName write FLastName;
      property HireDate: TDate read FHireDate write FHireDate;
      property TerminateDate: Nullable<TDate> read FTerminateDate write FTerminateDate;
      property PayRate: Nullable<Currency> read FPayRate write FPayRate;



Thank you very much for the project, it usually helps indeed. But in this case specifically, the error seems to indicate that there is no column named FIRST_NAME in your employees table, and from the project I can't tell how is your nexusDB table structure.
My guess is that the field name in your employees table is "FirstName", not "FIRST_NAME". You are using [Automapping] in Aurelius, which means it will convert camel case field/property names into uppercase, underlined database column names.
A field "FirstName" will then be mapped to "FIRST_NAME". If your database column is named FirstName, then you have two options:

1. Remove the camel case and make it all lower case (except the first letter, which doesn't matter):

  [Entity, Automapping]
  TEmployee = class
      FId: Integer;
      FFirstname: String;
      FLastname: String;

2. Explicitly define the column names in the database table by using Column attribute:

  [Entity, Automapping]
  TEmployee = class
      [Column('Id', [TColumnProp.Required])]
      FID: Integer;
      [Column('FirstName', [TColumnProp.Required], 100)]
      FFirstName: String;
      [Column('LastName', [TColumnProp.Required], 100)]
      FLastName: String;

Note the "100" value above should be the size of your varchar column, I don't know what your actual size is.
Thank you Wagner,

That was indeed the case and I saw that in the error message but did not know how to fix it. I went through the documentation section on Automapping several times as well and could not find this explanation. Could it be added?

Indeed, it's not described. Sorry about that. We will add it.

I also needed to add:
AureliusDataset1.Manager := ObjectManager;
to get it all working