       ;; (log/trace "created and put entity " e)
       (EntityMap. e))))
 
-          ;; e (try (.get (datastore) k)
-          ;;        (catch EntityNotFoundException e
-          ;;          ;; (log/trace (.getMessage e))
-          ;;          e)
-          ;;        (catch DatastoreFailureException e
-          ;;          ;; (log/trace (.getMessage e))
-          ;;          nil)
-          ;;        (catch java.lang.IllegalArgumentException e
-          ;;          ;; (log/trace (.getMessage e))
-          ;;          nil))
-                 ;; ]
-      ;; (if (emap? e)
-      ;;   (do
-      ;;     (log/trace "found entity " e)
-      ;;     (doseq [[k v] content]
-      ;;       (.setProperty e (subs (str k) 1) (str v)))
-      ;;     (log/trace "modified entity " e)
-      ;;     (.put (datastore) e)
-      ;;     (log/trace "get name " (.getProperty e "name"))
-      ;;     e)
-
-
 (defn key=
   [em1 em2]
   (.equals (.entity em1) (.entity em2)))
-
-;; (defn get
-;;   [^EntityMap em prop]
-;;   ;; (log/trace "getting prop " prop " for ent " em)
-;;   (let [p (.getProperty (.entity em) (subs (str prop) 1))]
-;;     ;;(log/trace "got " p)
-;;     p))
-
-;; (defmacro :
-;;   [prop em]
-;;   ;; (log/trace "getting prop " prop " for ent " em)
-;;   (let [p (.getProperty em (subs (str prop) 1))]
-;;     ;;(log/trace "got " p)
-;;     p))
-
-;;;; TODO embedded entities
-
-
-;; (def
-;;  ^{:arglists '([map key val] [map key val & kvs])
-;;    :doc "assoc[iate]. When applied to a map, returns a new map of the
-;;     same (hashed/sorted) type, that contains the mapping of key(s) to
-;;     val(s). When applied to a vector, returns a new vector that
-;;     contains val at index. Note - index must be <= (count vector)."
-;;    :added "1.0"
-;;    :static true}
-;;  assoc
-;;  (fn ^:static assoc
-;;    ([map key val] (. clojure.lang.RT (assoc map key val)))
-;;    ([map key val & kvs]
-;;     (let [ret (assoc map key val)]
-;;       (if kvs
-;;         (if (next kvs)
-;;           (recur ret (first kvs) (second kvs) (nnext kvs))
-;;           (throw (IllegalArgumentException.
-;;                   "assoc expects even number of arguments after map/vector, found odd number")))
-;;         ret)))))
-
-;; (defn assoc
-;;   "assoc for DS Entities"
-;;   ;; ([^clojure.lang.IPersistentVector ekey propname val]
-;;   ;;  (let [e (emap! ekey)]
-;;   ;;    (.setProperty ekey (subs (str propname) 1) val)
-;;   ;;    e))
-;;   ([^com.google.appengine.api.datastore.Entity coll propname val]
-;;    (.setProperty coll (subs (str propname) 1) val)
-;;    coll)
-;;   ([^com.google.appengine.api.datastore.Entity coll propname val & kvs]
-;;    (.setProperty coll (subs (str propname) 1) val) ; setProperty returns void
-;;    (if kvs
-;;      (recur coll (first kvs) (second kvs) (nnext kvs))
-;;      coll)))
-
-  ;; ;; ([^clojure.lang.IPersistentVector coll propname val]
-  ;; ;;  )
-  ;; ([^com.google.appengine.api.datastore.Entity coll propname val]
-  ;;  (.setProperty coll (subs (str propname) 1) val)
-  ;;  (.put (datastore) coll)
-  ;;  coll)
-
 
 (defn assoc!
   "unsafe assoc with save but no txn for DS Entities"

       (if (= (class coll) Entity)
         (EntityMap. coll)
         (log/trace "EXCEPTION assoc!!")))))

;;   ;; ([^clojure.lang.IPersistentVector coll propname val]
;;   ;;  )

;; (defmethod assoc!! Entity
;;   ([^com.google.appengine.api.datastore.Entity coll ^Keyword propname val]
;;      ;; e (Entity. k)]
;;   ([^com.google.appengine.api.datastore.Entity coll ^Keyword propname val & kvs]
;;    (.setProperty coll (subs (str propname) 1) val) ; setProperty returns void
;;    (if kvs
;;      (recur coll (first kvs) (second kvs) (nnext kvs))
;;      coll)))

;; (defmethod assoc!! EntityMap
;;   ([^EntityMap coll ^Keyword propname val]
;;    {:pre {[(nil? (clj/namespace propname))]}
;;    (let [txn (.beginTransaction (datastore))]
;;      ;; e (Entity. k)]
;;      (try
;;        (.setProperty coll (clj/name propname) val)
;;        (.put (datastore) coll)
;;        (.commit txn)
;;        (finally
;;          (if (.isActive txn)
;;            (.rollback txn))))
;;      coll))
;;   ([^com.google.appengine.api.datastore.Entity coll propname val & kvs]
;;    (.setProperty coll (subs (str propname) 1) val) ; setProperty returns void
;;    (if kvs
;;      (recur coll (first kvs) (second kvs) (nnext kvs))
;;      coll)))

;; (def
;;  ^{:arglists '([coll x] [coll x & xs])
;;    :doc "conj[oin]. Returns a new collection with the xs
;;     'added'. (conj nil item) returns (item).  The 'addition' may
;;     happen at different 'places' depending on the concrete type."
;;    :added "1.0"
;;    :static true}
;;  conj (fn ^:static conj
;;         ([coll x] (. clojure.lang.RT (conj coll x)))
;;         ([coll x & xs]
;;          (if xs
;;            (recur (conj coll x) (first xs) (next xs))
;;            (conj coll x)))))

;; (defn into
;;   "Returns a new coll consisting of to-coll with all of the items of
;;   from-coll conjoined."
;;   {:added "1.0"
;;    :static true}
;;   [to from]
;;   (if (instance? clojure.lang.IEditableCollection to)
;;     (with-meta (persistent! (reduce conj! (transient to) from)) (meta to))
;;     (reduce conj to from)))

(defmacro emaps!
  [kind pred]

      (throw (IllegalArgumentException. "arg must be key, keyword, or a vector of keywords")))))


;; Key query (i.e. plain get)
(defmethod emaps?? 'Key
  [^clojure.lang.Keyword k]             ; e.g. :Foo/Bar
