Commits

Jacob Perkins  committed 20617b3

transform_selector for find

  • Participants
  • Parent commits 6c146cf

Comments (0)

Files changed (1)

File src/emongo.erl

 %%		 Result = documents() | response()
 find(PoolId, Collection, Selector, Options) when ?IS_DOCUMENT(Selector), is_list(Options) ->
 	{Pid, Pool} = gen_server:call(?MODULE, {pid, PoolId}, infinity),
-	Query = create_query(Options, Selector),
+	Query = create_query(Options, transform_selector(Selector)),
 	Packet = emongo_packet:do_query(Pool#pool.database, Collection, Pool#pool.req_id, Query),
 	Timeout = proplists:get_value(timeout, Options, ?TIMEOUT),
 	% TODO: generalize this for all send_recv calls