hi,
I use a firebird database
function TGuestService.LimitColumnGuest: TList<TGUEST>;
var
Manager: TObjectManager;
begin
Manager := TXDataOperationContext.Current.CreateManager(TMappingExplorer.Get('PUBLICGUEST'));
Result := Manager.Find<TGUEST>()
.Select(TProjections.ProjectionList
.Add(Linq['ID_REGISTRATION'].As_('idregistration'))
.Add(Linq['FULLNAME'].As_('fullname'))
.Add(Linq['ADDRESS'].As_('address'))
.Add(Linq['DATETIME_REGISTRATION'].As_('datetimeregistration'))) //<-- error this timestamp column type
.List;
TXDataOperationContext.Current.Handler.ManagedObjects.Add(Result);
if Result = nil then
raise EXDataHttpException.Create(403, 'guest not found');
end;
if without column DATETIME_REGISTRATION service works correctly, but if you include the datetime_registration column it will be an error message like this.
{
"error": {
"code": "TJsonTypeConverter.EConvertToJsonError",
"message": "Cannot serialize property of type \"Variant\", with value (variant), to Json format"
}
}
how is the right way?
thanks