datahike

silian 2025-09-15T02:31:46.132819Z

Is it the case Datahike employs db.type/ref because it does not offer Datomic equivalent “Entity interface”?

whilo 2025-09-16T08:48:12.776789Z

datahike (and datascript) support a similar entity model. refs are equally supported by datomic https://docs.datomic.com/schema/schema-reference.html#db-valuetype

whilo 2025-09-16T08:53:35.198109Z

you define something to be a ref in the schema, so it can be directly joined against in a query; otherwise you would have to explicitly join against entity id. so [?a :my/ref-attribute ?b] instead of [?a :my/non-ref-attributed-id ?b-id] [?b :db/id ?b-id]

silian 2025-09-16T08:58:49.424069Z

thanks whilo

👍 1
silian 2025-09-15T02:32:02.795899Z

Reading here: https://docs.datomic.com/reference/entities.html