Hello, I have installed Datomic dev-local, and try to run a simple query on the “Movies” db but I get the error: :db.error/not-an-entity Unable to resolve entity: :release/name. Any ideas? Many thanks in advance
Have you transacted the “Movies” schema? If so, can you share the query you’re running?
I have not transacted the “Movies” schema! I will do that and retry :-)
@jcf: I have created a simple schema
(def sch [{:db/id "1"
:db/ident :name
:db/cardinality :db.cardinality/one
:db/valueType :db.type/string
:db/doc "The name"}
])
and transacted it:
(d/transact conn {:tx-data sch})
then I add something:
(d/transact conn {:tx-data [{:db/id "1"
:name "Christos"
}]})
and then I query:
(d/q {:query '[:find ?e ?name
:where [?e :name ?name]]
:args [db]})
and get the error:
Execution error (ExceptionInfo) at datomic.core.error/raise (error.clj:55).
:db.error/not-an-entity Unable to resolve entity: :nameIs that db object from after your transactions?
No, it is not! Many thanks…:-)
It works now 🙂