              owned? (m/return
                       (applied-or-owned?
                        model
-                       (t/extract-uber-key-value model record)
+                       (t/extract-uber-key-value model unique-key-record)
                        insert-response))
 
              live-ref? (if-not owned?





(defn upsert
  "upsert a single instance, creating primary, secondary, unique-key and
   lookup records as required"

                                      session
                                      (:name unique-key-table)
                                      (:key unique-key-table)
                                      unique-key-record
                                      {:only-if
                                       (t/extract-uber-key-equality-clause
                                        model
