                    "entity has no valid :key metadata, and has no fields marked :key")))))
 
 
-(defn save!-helper [entity-record kind]
+(defn get-entity-object-helper [entity-record kind]
   (let [key-object (get-key-object entity-record)
         entity (if key-object
                    (Entity. key-object)

         (get-key-object-helper this# ~key-property ~kind))
       (get-key-object [this# parent#]
         (get-key-object-helper this# ~key-property ~kind :parent parent#))
       (save! [this#]
         (save!-helper this# ~kind)))))


(defmacro new* [entity-record-type property-values & {:keys [parent]}]

         (instance? clojure.lang.APersistentSet v) (to-java-hashset v) ; broken in GAE 1.3.7
         (extends? EntityProtocol (class v)) (get-key-object v)
         :else v)))


(defn- coerce-to-key-seq [any-seq]
  (map #(if (instance? Key %) % (get-key-object %)) any-seq))


(defn get-key-object-helper [entity-record key-property kind &
