threatgrid / asami

A graph store for Clojure and ClojureScript
Eclipse Public License 1.0
634 stars 29 forks source link

`:tg/owns` 'datoms' don't get retracted automatically #227

Open zeitstein opened 2 years ago

zeitstein commented 2 years ago

Consider

(d/transact conn [{:id 0 :array [{:id 1}]}])
(d/transact conn [{:id 0 :array' []}])

This is handled beautifully, except the :tg/owns statements on [:id 0] node are not retracted: :tg/owns is left pointing to two now non-existent nodes.

Another example:

(d/transact conn [{:id 0 :ent {:id 1}}])
(d/transact conn [{:id 0 :ent' nil}])