This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-09-28
Channels
- # 100-days-of-code (10)
- # announcements (2)
- # architecture (16)
- # beginners (51)
- # bitcoin (3)
- # calva (1)
- # cider (6)
- # cljdoc (8)
- # cljs-dev (14)
- # cljsrn (4)
- # clojure (59)
- # clojure-italy (26)
- # clojure-losangeles (1)
- # clojure-nl (13)
- # clojure-spec (54)
- # clojure-uk (81)
- # clojurebridge (4)
- # clojurescript (20)
- # core-async (16)
- # cursive (39)
- # datomic (27)
- # emacs (12)
- # events (1)
- # figwheel-main (20)
- # fulcro (35)
- # funcool (1)
- # graphql (9)
- # hyperfiddle (10)
- # jobs (1)
- # jobs-discuss (7)
- # keechma (10)
- # lumo (22)
- # nrepl (18)
- # off-topic (28)
- # onyx (3)
- # pedestal (4)
- # re-frame (8)
- # reagent (8)
- # ring (4)
- # rum (3)
- # shadow-cljs (29)
- # testing (5)
Hi, is it possible to add multiple JARs to the transactor classpath? The documentation only covers the case where a single jar is added. There has to be some kind of separator...
Just found a solution. For the record: One needs to copy the JARs that should go on the transactor's classpath into the /lib directory of the transactor. There are already several other jars present like ant and so on. Nothing else needed to be done (at least for datomic free). This is something I was not able to find in the docs. Maybe some lines about this topic should be added.
Sometimes I want to use multimethods on a pulled entity.
Problem is that I have no explicit type to dispatch on.
Any words of wisdom regarding this?
One solution is to add :db/entity-type
or something to all my schemas
You can also dispatch on the presence of specific combination of attributes
I fail to see how, without leaking knowledge to the dispatch fn?
I think it's pretty common practice with datomic, to have an attribute for that
when Datomic says "tempid used only as value in transaction" is there any way to get the specific assertion that caused it ?
that's one of the most cryptic error messages in Datomic imo. it can mean using a tempid of an entity that's not in the transaction, or trying to use a string where a ref should've been
in particular, the second case isn't obvious at all
ladies and gentlemen, 1) do you add your custom attributes to datomic schema to specify the domain-type of a ref-type attributes value(s)? For example, :foo/bars is a :type/ref :cardinality/many attribute, and it supposed to contain :bar entities. But vanilla db-schema does not specify the type of the objs it points to. 2) how often do you have same :type/ref attributes pointing to the objs of different domain type? E.g. :foo/bars pointing to 2 :bar objs and 1 :baz obj.
1) yes I specify the type of a ref, but I don't validate it 2) almost always, a ref attr has values that refer to entities of the same type
it helps with ES indexing, but not much else
3) how do you give a name to a domain obj, if there is no reified "entity" notion in datomic, because any id can "contain" any attributes out of schema
I have a :schema/type
attribute. every entity has this attribute. an example value is :schema.type/user
. when I create a ref attribute, I usually set a :schema/refEntityType
, for example :schema.type/user
.
in the case of ES, it helps me to identify special cases, like i18n entities
I'm just saying, it's not a bad idea, it can be helpful, but it's not that needed
for example, in ES I can't just save :product/name
as a product/name
field in ES. I need to generate one for every lang, such as product/name__en_US
for indexing purposes
when I encounter a ref with a refEntityType
of :schema.type/i18n
, I do that
> any id can "contain" any attributes out of schema this is helpful, but it's also helpful to know the type of the entities, and to know what type should a ref point to 🙂
there are attrs that are specific to an entity, like :user/name
, but also global ones