This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-03-12
Channels
- # arachne (1)
- # beginners (26)
- # cljs-dev (53)
- # cljsrn (1)
- # clojure (140)
- # clojure-italy (13)
- # clojure-russia (14)
- # clojure-spec (5)
- # clojure-uk (6)
- # clojurescript (52)
- # datascript (4)
- # datomic (11)
- # dirac (11)
- # emacs (12)
- # hoplon (9)
- # jobs (4)
- # lein-figwheel (1)
- # off-topic (29)
- # om (10)
- # om-next (1)
- # pedestal (3)
- # protorepl (1)
- # re-frame (16)
- # ring (12)
- # rum (27)
- # slack-help (12)
- # spacemacs (27)
- # unrepl (19)
- # untangled (26)
- # yada (8)
@yonatanel I might look into that more. My larger project involves returning a set satisfying lots of aggregate predicates (is that a good term?) like that. I'm generating (or proving the non-feasibility of) education plans for finishing a Bachelor's degree within 4 years. There are requirements like "no more than 15 credits per academic term/semester" and "must contain at least 6 credits worth of this subset of courses"
Does anyone know if there’s a tutorial out there that explains how to update nested entities, ie. entities that are components? Or explain here?
Let’s say I have nested structure like this:
[:x/value [{:x/value [{:text “test”}]}]]
where :x/value
is defined in the schema as a component. When transacted, I get the entity id for this entity 12345. Later, I want to update the nested value. How would I do that?Get the db/id of the component entity, and add/retract on that entity like any other @ezmiller77
@favila i think add
is the piece i’ve been missing. since I’ve just been using (d/transact)
so far.
@ezmiller77 no this is not a function. Db/add, db/retract assertions etc
@ezmiller77 component entities are not special, it's the component attribute that is special
@favila I think I follow.
I think I have two separate problems that I’ve been treating as one. The first is just how to do that update, which I think you answered. The second is more related to my particular problem: that if the value of :text has changed than I won’t know which entity to update unless I keep track of the :db/id.