1
我是Clojure的新手,我遇到了Monger問題。不讓Monger序列化
我正在嘗試與朋友一起使用Monger。我有這個NS:
(ns cemerick.friend-demo.users
(:require [cemerick.friend.credentials :refer (hash-bcrypt)]))
(def users (atom {"friend" {:username "friend"
:password (hash-bcrypt "clojure")
:pin "1234" ;; only used by multi-factor
:roles #{::user}}
"friend-admin" {:username "friend-admin"
:password (hash-bcrypt "clojure")
:pin "1234" ;; only used by multi-factor
:roles #{::admin}}
(derive ::admin ::user)
當我嘗試這與
(mc/insert "users" {:username "friend",
:password "$2a$10$YGcqRFL67J5NDo7hfkVslerDYc1iIGBy0js871wxnXxOvdvJZ4Aua",
:pin "1234",
:roles #{:cemerick.friend-demo.users/user}})
蒙格序列化添加到使用蒙格數據庫#{:cemerick.friend-demo.users/user}
爲"user"
有沒有什麼辦法可以把該值作爲是或有什麼辦法將"user"
更改爲#{:cemerick.friend-demo.users/user}
?