Fork me on GitHub
#datomic
<
2021-09-13
>
danbunea06:09:36

Super newbie question: I have a schema where I need a custom attibute in Datomic Cloud:

[
   {
    :db/ident :user/id 
    :db/valueType :db.type/keyword
    :db/unique :db.unique/identity
    

    :db/cardinality :db.cardinality/one
    }
   {:db/ident :user/name
    :db/valueType :db.type/string
    :db/cardinality :db.cardinality/one
    :field/label "Name"
    }
  ]
the result:
; Execution error (ExceptionInfo) at datomic.client.api.async/ares (async.clj:58).
; Unable to resolve entity: :field/label

Fredrik06:09:48

:field/label must itself be declared in the schema

{:db/ident :field/label
 :db/valueType :db.type/string
 ...}

Fredrik06:09:42

The error comes from trying to set the value of an attribute, in this case :field/value, which Datomic is not yet aware of