    [qbits.alia.manifold :as aliam]
    [qbits.hayt :as h]
    [er-cassandra.key :as k]
-   [er-cassandra.record :as r]
-   [er-cassandra.record-either :as re]
+   [er-cassandra.record-either :as r]
    [er-cassandra.model.types :as t]
    [er-cassandra.model.util :refer [combine-responses create-lookup-record]])
   (:import [er_cassandra.model.types Model]))

                        insert-response))

               live-ref? (if-not owned?
                           (re/select-one session
                                          (get-in model [:primary-table :name])
                                          (get-in model [:primary-table :key])
                                          (t/extract-uber-key-value

                  :key key :key-value key-value}]

    (m/with-monad dm/either-deferred-monad
      (m/mlet [insert-response (r/insert session
                                          (:name unique-key-table)
                                          unique-key-record
                                          {:if-not-exists true})
