8thlight / hyperion

Clojure API for generic persistence.
118 stars 18 forks source link

:contains not working on mongo driver #29

Open paytonrules opened 10 years ago

paytonrules commented 10 years ago

I found an issue where :contains is working as expected on the in-memory datastore, but is not functioning on mongo.

It's a simple case of:

vushaper.repl=> (find-by-kind (str :project) :filters [:contains :key '("cHJvamVjdDo4OWYwNWM0NTllYTk0N2M4OGQzNGZmNTJhM2M1NjUyNw" "cHJvamVjdDpsbElnRWc5Sw" "cHJvamVjdDpsbElnRWc5Sw" "cHJvamVjdDoxOU45NU1GRA")])
()

Yet if I do the same thing with the monger driver:

vushaper.repl=> (count (mw/find-in "project" '("cHJvamVjdDo4OWYwNWM0NTllYTk0N2M4OGQzNGZmNTJhM2M1NjUyNw" "cHJvamVjdDpsbElnRWc5Sw" "cHJvamVjdDpsbElnRWc5Sw" "cHJvamVjdDoxOU45NU1GRA")))
2

The second is correct. It's fairly nasty since in-memory works.

jah2488 commented 10 years ago

Interesting. I ran into an issue this past week where the after-create callbacks were working fine with the in-memory datastore, but not working much on Mongo. I decided that I'll do some more testing to see if I can narrow down the problem before opening an issue, but I wonder if they could be tangentially related.

aspalding commented 9 years ago

See https://github.com/8thlight/hyperion/issues/30.

I'll try to reproduce this anyway.