Fork me on GitHub

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?