Skip to content

:db/valueType :db.type/tuple support in schema? #407

@joodie

Description

@joodie

I'm working on some code that uses composite tuples. Looking at the datomic documentation, I was trying to define such a tuple as

{:db/valueType :db.type/tuple
  :db/tupleAttrs [:my/att1 :my/att2]
  :db/unique :db.unique/identity}

But that fails with

Bad attribute specification for ..., expected one of #{:db.type/ref}

Reading the datascript docs more closely it seems that I must not use db/valueType here; composite attributes are defined by having a :db/tupleAttrs attribute in their schema.

Is this difference in behavior intentional? I wouldn't mind providing a patch to allow a db.type/tuple in this specific case if that's a welcome addition.

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