You want use $elemMatch to test for items in an array:
http://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-ValueinanArray
In karras that would be:
(fetch-one projects (where (element-match :users uu)))
That doesn't explain why the first query passed. I can recreate it,
but I d
I'm trying to update a document that has an user list inside:
test.db> (def uu (fetch-one users (where (eq :name "victor"
#'test.db/uu
test.db> uu
{:password "1234", :name "victor", :_id #}
test.db> (def pp (insert projects {:name "test" :users [uu]}))
#'test.db/pp
test.db> pp
{:_id #, :users