This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-12-19
Channels
- # adventofcode (36)
- # asami (3)
- # babashka (22)
- # beginners (65)
- # calva (5)
- # clj-kondo (1)
- # cljs-dev (3)
- # clojure-europe (1)
- # clojurescript (3)
- # conjure (1)
- # core-async (6)
- # datomic (3)
- # emacs (4)
- # introduce-yourself (3)
- # juxt (11)
- # lsp (64)
- # malli (10)
- # missionary (11)
- # music (1)
- # off-topic (2)
- # pathom (1)
- # practicalli (1)
- # reagent (6)
- # reitit (3)
- # releases (3)
- # xtdb (9)
@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 :)