Please forgive me if I'm misunderstanding, but this doesn't seem quite right. It's perfectly possible to use persistent storage from clojure without explicitly using atoms.
datahike.db/explode/iter/fn db.cljc: 1198
datahike.db/validate-attr db.cljc: 984
clojure.lang.ExceptionInfo: Bad entity attribute :db/retract at #:db{:id 149, :retract [:message/content "f78a3ec0-6c97"]}, not defined in current schema
attribute: :db/retract
context: #:db{:id 149, :retract [:message/content "f78a3ec0-6c97"]}
error: :transact/schema
how can I commence a retract?
I am looking at this to no avail: https://github.com/replikativ/datahike/search?q=retract&unscoped_q=retractAh, you can retract a lot of tuples like :db/retract [pairs-of-tuples-here] i think... testing it out now 🙂
(defn commence-remove-upvote
"removes an upvote with retract transaction"
[messageid authorid]
(d/transact conn [ {:db/retract [:message/content messageid]
:message/authorid authorid
:message/kind "upvote"}]))
;_; no dice
clojure.lang.ExceptionInfo: Bad entity attribute :db/retract at #:db{:id 154, :retract [:message/content "6b45b69c-11d5" :message/authorid "<mailto:jack@satisologie.com|jack@satisologie.com>" :message/kind "upvote"]}, not defined in current schema
almost there.. {} was not right, [] was the answer... hopefully a unique dbRef will be all i need now