Based on the followind example, adapt if to pupulate the info from a TUniQuery and map it to the properties that map the Field anmes of the query:

unit Example_SetInfoNullable;

interface

uses System.SysUtils, System.Rtti, pixel_classes;

type
  TEmployeeProject = class
  private
    FEmployeeID: TNullable<Integer>;
    FDepartmentID: TNullable<Integer>;
    FEmployeeName: TNullable<String>;
    FProjectID: TNullable<Integer>;
    FProjectName: TNullable<String>;
    FProjectBudget: TNullable<Currency>;
    FProjectDate: TNullable<TDateTime>;
    FProjectStartMoment: TNullable<TDateTime>;

  published
    property EmployeeID: TNullable<Integer> read FEmployeeID write FEmployeeID;
    property DepartmentID: TNullable<Integer> read FDepartmentID write FDepartmentID;
    property EmployeeName: TNullable<String> read FEmployeeName write FEmployeeName;
    property ProjectID: TNullable<Integer> read FProjectID write FProjectID;
    property ProjectName: TNullable<String> read FProjectName write FProjectName;
    property ProjectBudget: TNullable<Currency> read FProjectBudget write FProjectBudget;
    property ProjectDate: TNullable<TDateTime> read FProjectDate write FProjectDate;
    property ProjectStartMoment: TNullable<TDateTime> read FProjectStartMoment write FProjectStartMoment;
  end;

procedure ORM_TestNullable;

implementation

procedure Set_Info(MyObj:TObject; PropName: string; const Value: TValue);
var
  PropKind: TTypeKind;
  Ctx: TRttiContext;
  Field: TRttiField;
begin
  Ctx := TRttiContext.Create;
  try
    Field := Ctx.GetType(MyObj.ClassType).GetField('F' + PropName);
    if Assigned(Field) then Field.SetValue(MyObj, Value)
    else
      raise Exception.Create('Error: Field "' + PropName + '" not found.');
  finally
    // TRttiContext is a record; no need to free
  end;
end;

procedure Set_Info_NullableDateTime(MyObj:TObject; PropName: string; const Value: TNullable<TDateTime>);
begin
  Set_Info(MyObj, PropName, TValue.From<TNullable<TDateTime>>(Value));
end;

procedure Set_Info_NullableExtended(MyObj:TObject; PropName: string; const Value: TNullable<Extended>);
begin
  Set_Info(MyObj, PropName, TValue.From<TNullable<Extended>>(Value));
end;

procedure Set_Info_NullableInteger(MyObj:TObject; PropName: string; const Value: TNullable<Integer>);
begin
  Set_Info(MyObj, PropName, TValue.From<TNullable<Integer>>(Value));
end;

procedure Set_Info_NullableInt64(MyObj:TObject; PropName: string; const Value: TNullable<Int64>);
begin
  Set_Info(MyObj, PropName, TValue.From<TNullable<Int64>>(Value));
end;

procedure Set_Info_NullableString(MyObj:TObject; PropName: string; const Value: TNullable<string>);
begin
  Set_Info(MyObj, PropName, TValue.From<TNullable<string>>(Value));
end;

procedure Set_Info_NullableVariant(MyObj:TObject; PropName: string; const Value: TNullable<Variant>);
begin
  Set_Info(MyObj, PropName, TValue.From<TNullable<Variant>>(Value));
end;

procedure DisplayProjectInfo(Project: TEmployeeProject);
begin
  Writeln('Employee ID: ', Project.EmployeeID.Value);
  Writeln('Department ID: ', Project.DepartmentID.Value);
  Writeln('Employee Name: ', Project.EmployeeName.Value);
  Writeln('Project ID: ', Project.ProjectID.Value);
  Writeln('Project Name: ', Project.ProjectName.Value);
  Writeln('Project Budget: ', FormatCurr('0.00', Project.ProjectBudget.Value));
  Writeln('Project Date: ', DateTimeToStr(Project.ProjectDate.Value));
  Writeln('Project Start Moment: ', DateTimeToStr(Project.ProjectStartMoment.Value));
end;

procedure ORM_TestNullable;
var
  Project: TEmployeeProject;
begin
  try
    Project := TEmployeeProject.Create;

    // Setting the values using Set_Info procedures
    Set_Info_NullableInteger(Project, 'EmployeeID', 101);
    Set_Info_NullableInteger(Project, 'DepartmentID', 10);
    Set_Info_NullableString(Project, 'EmployeeName', 'John Doe');
    Set_Info_NullableInteger(Project, 'ProjectID', 1234);
    Set_Info_NullableString(Project, 'ProjectName', 'AI Research');
    Set_Info(Project, 'ProjectBudget', TValue.From<TNullable<Currency>>(50000.0));
    Set_Info_NullableDateTime(Project, 'ProjectDate', EncodeDate(2023, 10, 20));
    Set_Info_NullableDateTime(Project, 'ProjectStartMoment', Now);

    // Displaying the project information
    DisplayProjectInfo(Project);
  finally
    Project.Free;
  end;

  Readln;
end;

end.