asami

zeitstein 2021-12-19T19:32:21.261400Z

@quoll, how should I append entity reference to an array of such references? None of the below work:

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

  (d/transact conn [{:id "new"}
                    {:id 0 :array+ {:id "new"}}])

  (d/transact conn [{:id "new"}
                    {:id 0 :array+ [:id "new"]}])

  (d/transact conn [{:id "new2"}
                    {:id 0 :array+ "new2"}])

  (d/transact conn [{:id "new3" :db/id -1}
                    {:id 0 :array+ -1}])
The only way it works is:
(d/transact conn [{:db/id :tg/node-1}
                    {:db/id :tg/node-0 :array [{:db/id :tg/node-1}]}])

  (d/transact conn [{:db/id :tg/node-new}
                    {:db/id :tg/node-0 :array+ :tg/node-new}])
https://github.com/threatgrid/asami/issues/225 about this a while back. If you have time, of course :)

quoll 2021-12-19T20:28:33.262700Z

I can't this week! I’m on the road (18 hours so far) and don't have a computer with me

zeitstein 2021-12-19T20:31:33.262800Z

Enjoy šŸ™‚