TDateTimeMS type is supposed to have a millisecond part, when adding to an external database (e.g., PostgreSQL).
It works as expected if the record is added individually using the Add method.
Howerver, when BatchAdd, mORMot will mistakenly strip off the millisecond part of TDateTimeMS field inside method TSQLDBStatementWithParams.BindArray, Line 7891-7896, of SynDB.pas:
if (ParamType=ftDate) and (ChangeFirstChar<>'T') then
for i := 0 to ValuesCount-1 do // fix e.g. for PostgreSQL
if (p^.VArray[i]<>'') and (p^.VArray[i][1]='''') then begin
v.From(PUTF8Char(pointer(p^.VArray[i]))+1,length(p^.VArray[i])-2);
p^.VArray[i] := v.FullText({expanded=}true,ChangeFirstChar,'''');
end;
I also checked the mORMot-generated SQL query sent to the database engine., which confirmed the above issue.
TDateTimeMS type is supposed to have a millisecond part, when adding to an external database (e.g., PostgreSQL).
It works as expected if the record is added individually using the
Add
method.Howerver, when
BatchAdd
, mORMot will mistakenly strip off the millisecond part of TDateTimeMS
field inside methodTSQLDBStatementWithParams.BindArray
, Line 7891-7896, of SynDB.pas:I also checked the mORMot-generated SQL query sent to the database engine., which confirmed the above issue.
Can you please double check? Thanks.