 
 (def Entity
   "Schema for saved entities"
-  (merge NewEntity {:id s/Int}))
+  {:id s/Int
+   :name (s/maybe s/Str)})
 
 (defn- prepare-entity-for-save
   [entity]

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

                                  "entity")
      validated)))

(defn- validate-new-entity
  [storage entity]
  (validate-entity storage NewEntity entity))

(defn- validate-existing-entity
  [storage entity]
  (validate-entity storage Entity entity))

(defn create
  "Creates a new entity"
  [storage-spec entity]
  (let [s (storage storage-spec)]
    (->> entity
         (validate-new-entity s)
         prepare-entity-for-save
         (create-entity s)
         prepare-entity-for-return)))
