You are not logged in.
Pages: 1
i used TSQLRestServerFullMemory
and add a TSynValidateUniqueField in my Model
then i find the validation didn't work at all.
trace the code in TSQLRestServerStaticInMemory.EngineList
SQL generate by the validation 'SELECT RowID FROM PaymentCartItem WHERE bill_code=:(''CD-20131213-2''): LIMIT 1;'
if IsZero(Fields) then
if IsSelectCountWhere and (FoundLimit=0) and (FoundOffset=0) then
// was "SELECT Count(*) FROM TableName WHERE ..."
SetCount(FindWhereEqual(WhereField,WhereValue,DoNothingEvent,nil,0,0)) else
// invalid "SELECT FROM Table" ?
exit else begin /******** it will treat the SQL as invalid and exit with no excute **********/
// save rows as JSON, with appropriate search according to Where* arguments
MS := TRawByteStringStream.Create;
try
ResCount := GetJSONValues(MS,ForceAJAX or (not NoAJAXJSON),
withID,Fields,WhereField,WhereValue,FoundLimit,FoundOffset);
result := MS.DataString;
finally
MS.Free;
end;
see if someone has the same problem
Offline
and i fixed with
if IsZero(Fields) and (not WithID) then
Offline
We have now fixed issue in TSQLRestServerStaticInMemory.EngineList() when only ID is defined.
See http://synopse.info/fossil/info/9faef05930
Thanks a lot for your feedback!
Offline
Pages: 1