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 https://GaryShelton@bitbucket.org/GaryShelton/nexus_aurelius.git
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);
var
List: TList<TEmployee>;
begin
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.SetSourceList(List);
AureliusDataset1.Active := True;
end;
Entitiy:
type
[Entity, Automapping]
[Table('employees')]
TEmployee = class
private
FID: Integer;
FFirstName: String;
FLastName: String;
FHireDate: TDate;
FTerminateDate: Nullable<TDate>;
FPayRate: Nullable<Currency>;
public
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;
end;
registered:
initialization
RegisterEntity(TEmployee);
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);
var
List: TList<TEmployee>;
begin
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.SetSourceList(List);
AureliusDataset1.Active := True;
end;
Entitiy:
type
[Entity, Automapping]
[Table('employees')]
TEmployee = class
private
FID: Integer;
FFirstName: String;
FLastName: String;
FHireDate: TDate;
FTerminateDate: Nullable<TDate>;
FPayRate: Nullable<Currency>;
public
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;
end;
registered:
initialization
RegisterEntity(TEmployee);