You are not logged in.
Hello, after I updated the mORMot sources, I started getting the following error:
EORMBatchException {"Message":"TServidorApp.EngineBatchSend: Unknown @Licencas"}
The table is registered normally:
VirtualTableExternalRegister(fModelo, TSqlLicencas, fBD.Conexao, 'CLIFOR_LICENCAS');
fModelo.Props[TSqlLicencas].ExternalDB.MapField('ID', 'LIC_ID');
Going back to the commit works correctly.
This system has been in production for years.
Offline
Yes, it is related to the excerpts below:
function TSQLModel.GetTableIndexPtr(SQLTableName: PUTF8Char): integer;
begin
if (self<>nil) and (SQLTableName<>nil) then begin
result := FastFindUpperPUTF8CharSorted( // O(log(n)) binary search
pointer(fSortedTablesNameUpper),fTablesMax,SQLTableName,StrLen(SQLTableName));
if result>=0 then
result := fSortedTablesNameIndex[result];
end else
result := -1;
end;function FastFindUpperPUTF8CharSorted(P: PPUTF8CharArray; R: PtrInt;
Value: PUTF8Char; ValueLen: PtrInt): PtrInt;
var tmp: array[byte] of AnsiChar;
begin
UpperCopy255Buf(@tmp,Value,ValueLen);
result := FastFindPUTF8CharSorted(P,R,@tmp);
end;
Last edited by Márcio Baroni (2022-04-26 12:28:36)
Offline
I am not able to reproduce the issue.
See my test program https://github.com/synopse/mORMot2/commit/5973720f
Could you debug a little on your side and try to find out what is wrong in your case?
Offline
I think I have found the culprit.
Please try https://synopse.info/fossil/info/f64cd122ef
Sorry for the inconvenience, and thanks for the feedback.
Offline
Thanks, working properly.
Offline