You are not logged in.
Pages: 1
and i fixed with
if IsZero(Fields) and (not WithID) then
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
Pages: 1