This simple snippet doesn't work, I would like sort the document by name but the documents returned have no order
procedure TForm1.Button1Click(Sender: TObject);
var
cursor : TMongoCursor;
begin
cursor := TMongoCursor.Create(BSON([]));
cursor.sort := BSON(['name','1']);
if mongo.find(ns, cursor) then begin
while cursor.next() do begin
ShowMessage(cursor.value().find('name').value);
end;
end;
end;
[EDIT]: solved with latest fix on Jun 15, 2017