Skip to content

Add transaction options to indicate updates on entity attributes #212

@quoll

Description

@quoll

Right now entities can be marked for update via replacement annotations. This can be left in place, but we also want to add in the option to mark entities as single-cardinality via a temporary schema during a transaction. This can be passed as a field in the tx-info argument of transact.

For instance, instead of the annotated fields of :name' and :income' in the example for replacement annotations we can have:

(d/transact conn
            {:tx-data [{:db/ident "will" :name "Fitzwilliam" :county "Derbyshire" :income 10000}]
             :schema [{:db/ident :name :db/cardinality :db.cardinality/one}
                      {:db/ident :income :db/cardinality :db.carinality/one})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions