Fork me on GitHub
#datomic
<
2020-12-08
>
Christos08:12:32

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

jcf08:12:53

Have you transacted the “Movies” schema? If so, can you share the query you’re running?

Christos08:12:31

I have not transacted the “Movies” schema! I will do that and retry :-)

Christos10:12:13

@U06FTAZV3: 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: :name

favila13:12:44

Is that db object from after your transactions?

Christos14:12:15

No, it is not! Many thanks…:-)

Christos14:12:26

It works now 🙂

👍 3