Support DBObject conversion for all objects that implement clojure.lang.Named, not just keywords
This commit is contained in:
parent
07d44ddc1f
commit
e425bc84ea
1 changed files with 3 additions and 3 deletions
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
(ns monger.conversion
|
(ns monger.conversion
|
||||||
(:import [com.mongodb DBObject BasicDBObject BasicDBList DBCursor]
|
(:import [com.mongodb DBObject BasicDBObject BasicDBList DBCursor]
|
||||||
[clojure.lang IPersistentMap Keyword Ratio]
|
[clojure.lang IPersistentMap Named Ratio]
|
||||||
[java.util List Map Date]
|
[java.util List Map Date]
|
||||||
org.bson.types.ObjectId))
|
org.bson.types.ObjectId))
|
||||||
|
|
||||||
|
|
@ -43,8 +43,8 @@
|
||||||
(to-db-object [^Ratio input]
|
(to-db-object [^Ratio input]
|
||||||
(double input))
|
(double input))
|
||||||
|
|
||||||
Keyword
|
Named
|
||||||
(to-db-object [^Keyword input] (.getName input))
|
(to-db-object [^Named input] (.getName input))
|
||||||
|
|
||||||
IPersistentMap
|
IPersistentMap
|
||||||
(to-db-object [^IPersistentMap input]
|
(to-db-object [^IPersistentMap input]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue