Hi! Is it possible to define and transact a unique composite tuple attribute at the same time as the individual attributes it depends on? I’m getting this error when I try to do that:
{:cognitect.anomalies/category :cognitect.anomalies/incorrect, :cognitect.anomalies/message First error: :db.error/invalid-tuple-attrs, :db/errors (#:db{:error :db.error/invalid-tuple-attrs, :tupleAttrs [:transaction/company :transaction/integration-id]}), :db/error :db.error/invalid-install-attribute}
It works just fine if I transact the individual attributes first, and then add the tuple attribute in a separate transaction. Is that expected behaviour?😅 I didn’t notice any info about this in https://docs.datomic.com/schema/schema-reference.html#composite-tuples.
P.S. Datomic ProYes you must transact first. This is a consequence of its transaction model https://docs.datomic.com/transactions/model.html#with-and-transact
There are no visible intra-transaction states, which is what you would need for composite attr installed in same tx as its components to work
Noticed https://clojurians.slack.com/archives/C03RZMDSH/p1748530799030919 about composite tuple, looks interesting=) Probably next time I will use heterogeneous tuple:sweat_smile:🤔