Fork me on GitHub

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.

Andreas Liljeqvist09:09:49

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

Andreas Liljeqvist16:09:20

I fail to see how, without leaking knowledge to the dispatch fn?


I have an :all/type attr on all entities


well. I use an :schema/type attribute and all my entities have a type

­čĹŹ 4

I think it's pretty common practice with datomic, to have an attribute for that


if you have a shared attribute, does that cause any issues with indexes?


say, :sys/created-at or something too


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


how your (1) helps then? isn't some "name convention" enough then?


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


to lookup clojure-to-ES mappings?


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


sweet, thank you for reply