This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-09-14
Channels
- # ai (3)
- # babashka (45)
- # beginners (81)
- # biff (26)
- # calva (10)
- # cider (5)
- # clj-kondo (55)
- # cljfx (6)
- # clojure (125)
- # clojure-berlin (1)
- # clojure-europe (37)
- # clojure-italy (7)
- # clojure-nl (3)
- # clojure-norway (79)
- # clojure-uk (1)
- # clojurescript (63)
- # clojutre (1)
- # conjure (5)
- # cursive (37)
- # data-science (1)
- # datalevin (4)
- # datomic (28)
- # eastwood (6)
- # fulcro (26)
- # graphql (20)
- # honeysql (6)
- # humbleui (4)
- # jobs-discuss (5)
- # kaocha (1)
- # leiningen (8)
- # missionary (5)
- # nbb (4)
- # observability (3)
- # off-topic (7)
- # pathom (8)
- # podcasts-discuss (1)
- # rewrite-clj (18)
- # ring (6)
- # sci (23)
- # scittle (9)
- # shadow-cljs (49)
- # squint (10)
- # testing (11)
- # xtdb (17)
What is the recommended approach for transacting data with cylces? for example:
;; schema
{:user/id {:db/valueType :db.type/keyword :db/unique :db.unique/identity}
:user/friends {:db/valueType :db.type/ref :db/cardinality :db.cardinality/many}
:user/name {:db/valueType :db.type/string :db/unique :db.unique/identity}}
(d/transact! conn
[{:user/id :user-2 :user/name "user 2" :user/friends [[:user/id :user-2] [:user/id :user-1]]}
{:user/id :user-1 :user/name "user 1" :user/friends [[:user/id :user-2]]]})
;; =>
Execution error (ExceptionInfo) at datalevin.db/entid-strict (db.cljc:435).
Nothing found for entity id [:user/id :user-1]
Would you just do this with multiple transactions, insert each user without the friends and then submit another transaction to add the friends?