This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-10-29
Channels
- # aws (2)
- # bangalore-clj (2)
- # beginners (36)
- # boot (10)
- # cider (9)
- # cljs-dev (19)
- # clojure (47)
- # clojure-russia (4)
- # clojure-spec (18)
- # clojure-uk (4)
- # clojurescript (71)
- # core-async (20)
- # core-logic (2)
- # css (3)
- # cursive (5)
- # data-science (15)
- # datomic (7)
- # emacs (13)
- # figwheel (4)
- # klipse (1)
- # luminus (5)
- # lumo (1)
- # off-topic (33)
- # re-frame (17)
- # shadow-cljs (1)
- # spacemacs (5)
- # specter (21)
- # unrepl (1)
- # vim (7)
@lmergen I'd have to see more thorough examples about what exactly you mean by "domain" and what facts you plan to store, but I would default to a single entity (e.g. pick its own namespace, neither accounting
nor infrastructure
) and make the distinction at the application level when querying. So, following your example, the schema might be customer/uuid
, customer/name
, customer/foobar
, customer/accounting-id
. Accounting queries would use pull
to specify the attributes they want. Infrastructure queries would use pull
or entity
to get all customer attributes.
@daveliepmann i think you're right, that makes sense
i knew i was looking at this from the wrong perspective, but couldn't pinpoint what it was
i think the abstractions i'm trying to build are wrong, which is why it didn't really map that well to datomic entities
i should stick to a single entitiy in a single namespace, and make both domains query from that indeed
hi, I'm having a little problem with enums:
{:db/ident :user.role/administrator}
{:db/ident :user.role/user}
{:db/ident :user/roles
:db/valueType :db.type/ref
:db/cardinality :db.cardinality/many}
an user is both admin and user, I want to change it to just user, but it doesn't work:
(db/transact [{:schema/type :schema.type/user,
:user/name "A test",
:user/email "",
:user/roles #{:user.role/user},
:db/id 17592186045864}])
(db/touch-eid 17592186045864)
=>
{:schema/type :schema.type/user,
:user/name "A test",
:user/email "",
:user/description "Test2",
:user/roles #{:user.role/administrator :user.role/user}}
edit: solved by https://groups.google.com/forum/#!topic/datomic/sm0a8uWAHAY
(db/transact [[:db/retract 17592186045864 :user/roles 17592186045444]])