Upsert behavior with composite tuple key

Update: upsert is completely broken when the key tuple includes a false boolean value. Example from my application:

(d/transact sys/conn
            {:tx-data [{:rec.oc/track 9895604649984119
                        :rec.oc/user 28666467159376431
                        :rec.oc/hit? false
                        :rec.oc/key [28666467159376431 9895604649984119 false]}]})
Unique conflict: :rec.oc/key, value: [28666467159376431 9895604649984119 false] already held by: 18159534044352573 asserted for: 4925812092440654

I’m assuming this is related to this. Notes:

  • False values only showed up as nil when using d/with, not when doing a real transaction (note value: [28666467159376431 9895604649984119 false] in the example above).
  • The above example works when using d/with, it seems that upsert-for-keys-with-false-values is only completely broken for real transactions (at least when using d/with it’s only partially broken :wink: ).

For now I’m thinking I’ll have to just use another attribute in place of booleans, e.g. a keyword attribute with :true and :false as the values.