   [storage-spec entity]
   (-> storage-spec
       storage
-      (validate-entity entity)
+      (validate-existing-entity entity)
       (update-entity entity)))


(def Entity
  "Schema for saved entities"
  (merge NewEntity {:id s/Int}))

(defn- prepare-entity-for-save
  [entity]

  (rename-keys entity {:user_id :user-id}))

(defn- validate-entity
  [storage schema entity]
  (let [validated (validate-model entity schema "entity")]
    (if (entity-exists-with-name? storage
                                  (:user-id validated)
                                  (:name validated))
