monger
monger copied to clipboard
mc/insert-and-return does not return the same value as mc/find-one-as-map
mc is monger.collection.
If I insert:
{:foo {"a" 1}}
then insert-and-return
gives {:foo {"a" 1} :_id "..."}
but find-one-as-map
gives {:foo {:a 1} :_id "..."}
when querying back out. This is because these functions do not perform the keywordization they otherwise do on return values.