Skip to content

Support :db.type/keyword in schema #152

@thedavidmeister

Description

@thedavidmeister

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}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions