Skip to content

Instantly share code, notes, and snippets.

@myfit
Created June 3, 2010 19:28
Show Gist options
  • Save myfit/424341 to your computer and use it in GitHub Desktop.
Save myfit/424341 to your computer and use it in GitHub Desktop.
(use '(com.mongodb ObjectId))
(prn (. (ObjectId.) toString)))
"4c0800a583009bdc2bd8d166"
----
(defmethod print-dup com.mongodb.ObjectId [o w]
(.write w (format "#^com.mongodb.ObjectId (com.mongodb.ObjectId. \"%s\")" (. o toString))))
(prn (. (ObjectId.) toString)))
"(com.mongodb.ObjectId. \"4c08004b3c699bdcfc8e76d9\")"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment