This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-03-20
Channels
- # bangalore-clj (1)
- # beginners (145)
- # boot (8)
- # braid-chat (2)
- # capetown (2)
- # cider (27)
- # cljs-dev (232)
- # cljsrn (30)
- # clojure (223)
- # clojure-boston (1)
- # clojure-dusseldorf (2)
- # clojure-greece (1)
- # clojure-italy (21)
- # clojure-russia (16)
- # clojure-sanfrancisco (13)
- # clojure-spec (33)
- # clojure-uk (56)
- # clojurescript (165)
- # core-async (16)
- # core-logic (5)
- # cursive (14)
- # data-science (2)
- # datavis (2)
- # datomic (49)
- # duct (15)
- # editors (5)
- # emacs (6)
- # fulcro (11)
- # graphql (11)
- # hoplon (8)
- # jobs (4)
- # jobs-discuss (82)
- # jobs-rus (7)
- # leiningen (4)
- # luminus (5)
- # off-topic (90)
- # om (7)
- # om-next (1)
- # parinfer (67)
- # pedestal (34)
- # portkey (46)
- # re-frame (12)
- # reagent (4)
- # reitit (3)
- # remote-jobs (1)
- # ring-swagger (8)
- # shadow-cljs (13)
- # spacemacs (18)
- # specter (6)
- # sql (5)
- # tools-deps (4)
- # unrepl (40)
- # yada (26)
Hi, I've got this note-taking app (using om-next and datomic) with a schema of notes and notebooks. To be able to add notes to a notebook I've added this attribute to the note schema:
...
db/ident :note/notebook
:db/valueType :db.type/ref
:db/cardinality :db.cardinality/one
...
To add a note to a notebook I just add the ID of the notebook to the :note/notebook
attribute of the note, which in the frontend graph ends up showing like this: :note/notebook {:db/id 17592186046836}}
. I've added an ident of notebook/by-id id
to the notebooks om-next component, and I'd like this to be normalised in the graph like the rest of my code, so preferably it'd look like this instead: :note/notebook [:notebook/by-id 17592186046836]
Could someone tell me how I can move from the {:db/id id}
that I got from datomic to: note/notebook [:notebook/by-id id]
in the om-next frontend?