You are not logged in.
Pages: 1
Thank for you answer!
I migrated from mormot1 to mormot2 and the following code
doc: variant;
doc:=Coll.AggregateDoc('{ $sort : { _id: -1 } }, { $limit : 1 }',
[]);
does not return the result in mormot2, doc is empty.
But in mormot1, the function return one record.
What is the difference between mormot1 and mormot2?
Hi!
I have some problems when using mORMot with function TMongoCollection.AggregateDoc.
When using $limit:1 in operators, one result is returned as variant. But how to obtain results in case
when using $limit:5?
For example:
var
doc: variant;
begin
doc:= Coll.AggregateDoc('{$sort:{_id:-1}},{$limit:1}', []); ===> single record in doc is returned, OK!
but
doc:= Coll.AggregateDoc('{$sort:{_id:-1}},{$limit:5}', []); ===> multiple records as dvArray of TDocVariant should be returned(5 values)?
In multiple case, I did not able to read records from doc variable.
I am using Lazarus3.0
Pages: 1