clojure - Datomic valueType -
when trying persist list of node entities :threshold attribute defined in schema:
{:db/id #db/id[:db.part/db] :db/ident :node/threshold :db/valuetype :db.type/long :db/cardinality :db.cardinality/one :db/fulltext false :db/doc "threshold" :db.install/_attribute :db.part/db}
i following error:
compilerexception java.util.concurrent.executionexception: java.lang.illegalargumentexception: :db.error/wrong-type-for-attribute value 90 not valid :int attribute :node/threshold
i use following code:
(defn store-tree [tree] @(d/transact dbconn/conn (into [] (vals tree)))) (store-tree parsed-tree-with-refs)
where tree map of node names nodes.
curiously enough, took edn specific entity :node threshold 90 repl , manually transact'ed it, , worked without problems. used code:
@(d/transact dbconn/conn [{:db/id (d/tempid :db.part/user), :node/threshold 90, :node/location "us"}])
can please help?
thanks, vitaliy.
Comments
Post a Comment