This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-12-19
Channels
- # admin-announcements (27)
- # beginners (12)
- # boot (168)
- # cider (4)
- # clojure (27)
- # clojure-art (3)
- # clojure-austria (1)
- # clojure-russia (10)
- # clojurescript (50)
- # datomic (10)
- # editors (2)
- # hoplon (51)
- # ldnclj (26)
- # liberator (1)
- # off-topic (7)
- # om (23)
- # parinfer (6)
- # proton (7)
- # reagent (17)
- # yada (1)
I’m still trying to wrap my head around the best way to model created-by
in Datomic. Say that I have a task
entity which needs to track who created it, is it idiomatic to have a :task/created-by
attribute or should I use an :audit/user
attribute on the transaction? Appreciate thoughts...
I’m no Datomic guru, but from what I’ve read, the idiomatic way seems to be to add it to the transaction-entity
You could have a :user/tasks card/many entity pointing to all the tasks for that user (if it's an "owned" relationship).
I have entities category
and categorization
, the categorization
entity relates a category
with a subcategory
. I’d like to be able to find all of a category
’s ancestors by traversing it’s categorizations in a query
You can see the ‘flattened’ query written to find the parent, grandparent and great grandparent of a category. I’d like to generalize that though
thanks @hkjels and @zentrope — I’m thinking that because the notion of creation of a task is as first-class as the assignment of a task, I’m going to model this as a task attribute with :task/created-by
and :task/assigned-to