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
|
||||
(:import [com.mongodb DBObject BasicDBObject BasicDBList DBCursor]
|
||||
[clojure.lang IPersistentMap Keyword Ratio]
|
||||
[clojure.lang IPersistentMap Named Ratio]
|
||||
[java.util List Map Date]
|
||||
org.bson.types.ObjectId))
|
||||
|
||||
|
|
@ -43,8 +43,8 @@
|
|||
(to-db-object [^Ratio input]
|
||||
(double input))
|
||||
|
||||
Keyword
|
||||
(to-db-object [^Keyword input] (.getName input))
|
||||
Named
|
||||
(to-db-object [^Named input] (.getName input))
|
||||
|
||||
IPersistentMap
|
||||
(to-db-object [^IPersistentMap input]
|
||||
|
|
|
|||
Loading…
Reference in a new issue