Commits

Dmitry Belyaev  committed 9fc3c1e

bugfix: find_all result was reversed

  • Participants
  • Parent commits d610cf4

Comments (0)

Files changed (1)

File src/emongo.erl

 
 
 find_all_seq(Collection, Selector, Options) ->
-    lists:reverse(fold_all_seq(fun(I, A) -> [I | A] end, [], Collection, Selector, Options)).
+    [Fun0,Fun1] = fold_all_seq(fun(I, A) -> [I | A] end, [], Collection, Selector, Options),
+    
+    [Fun0,
+     fun(Pid, Database, ReqId) ->
+             lists:reverse(Fun1(Pid, Database, ReqId))
+     end].
 
 %%------------------------------------------------------------------------------
 %% fold_all