      (if (nil? parent#)
          entity#
          (with-meta entity# {:key (get-key-object entity# parent#)}))))
-
-
-(defn exists? [entity-record-type key-value-or-values &
-               {:keys [parent kind]
-                :or {kind (unqualified-name (.getName entity-record-type))}}]
-  (try
-    (retrieve entity-record-type key-value-or-values :parent parent :kind kind)
-    true
-    (catch EntityNotFoundException _ false)))
 
 
 ;;; Note that the code relies on the API's implicit transaction tracking

            {:key (.getKey entity)})))))


(defn delete! [target]
  (let [target (if (sequential? target) target [target])
        key (coerce-to-key-seq target)]

;;; user functions and macros
;;; ----------------------------------------------------------------------------

(defn- retrieve-helper [entity-record-type key-value-or-values &
                        {:keys [parent kind]
                         :or {kind (unqualified-name (.getName entity-record-type))}}]
  (let [make-key-from-value (fn [key-value real-parent]
                              (cond
                               ;; already a Key object
