mc/find-one-as-map can return malformed sub-maps with "/" character in the key.
Insert the following document:
{"content" : { "prjfoobar/files/foo" : "foo" }
(mc/find-one-as-map db "documents" { :_id (ObjectId. "5dfe449f1bbe8f22701dcf27") })
Returns:
{:_id #object[org.bson.types.ObjectId 0x93cf96d "5dfe449f1bbe8f22701dcf27"], :content #:prjfoobar{:files/foo "foo"}}
... the content map is pretty broken.
Version: 3.1.0
This seems to be just some strangeness with the clojure pretty printer if you do {(keyword "projfoobar/files/foo") "foo"} it returns #:projfoobar{:files/foo "foo"} which seems to be some kind of namespaced map (since having / in keywords allows you to namespace them) if you do (:projfoobar/files/foo {(keyword "projfoobar/files/foo") "foo"}) it returns "foo" and if you do (keys {(keyword "projfoobar/files/foo") "foo"}) it returns (:projfoobar/files/foo).
so it seems like everything works fine just the pretty printing is trying to be smart. if you want to print it more normally you can pass in false for keywordize http://reference.clojuremongodb.info/monger.collection.html#var-find-one-as-map and it wont turn the keys into keywords