I have an attribute that looks like this in my schema:
:foo/name {:db/unique :db.unique/identity
:db/valueType :db.type/keyword}
I'm adding to it from quite a few different places in my code, but it's always a keyword. I was hoping to not have to write :pre conditions to enforce the keyword-ness, and let the enforcing happen at the db level, but the above schema does not work.
I get this error:
db.cljc:536Uncaught #error {:message "Bad attribute specification for {:foo/name {:db/valueType :db.type/keyword}}, expected one of #{:db.type/ref}", :data {:error :schema/validation, :attribute :foo/name, :key :db/valueType, :value :db.type/keyword}}
I have an attribute that looks like this in my schema:
I'm adding to it from quite a few different places in my code, but it's always a keyword. I was hoping to not have to write
:preconditions to enforce the keyword-ness, and let the enforcing happen at the db level, but the above schema does not work.I get this error:
db.cljc:536Uncaught #error {:message "Bad attribute specification for {:foo/name {:db/valueType :db.type/keyword}}, expected one of #{:db.type/ref}", :data {:error :schema/validation, :attribute :foo/name, :key :db/valueType, :value :db.type/keyword}}