               (if (dc/reverse-ref? attr)
                 (-> (-lookup-backwards db eid (dc/reverse-ref attr) nil)
                     multival->js)
-                (cond-> (-lookup this attr)
+                (cond-> (lookup-entity this attr)
                   (dc/multival? db attr) multival->js))))
        (forEach [this f]
                 (doseq [[a v] (js-seq this)]

       (valAt [e k not-found] (lookup-entity e k not-found))

       clojure.lang.IFn
       (invoke [e k]      (c/get e k))
       ]))

(defn entity? [x] (instance? Entity x))


       IAssociative
       (-contains-key? [this k]
                       (not= ::nf (lookup-entity this k ::nf)))

       IFn
       (-invoke [this k]
                (lookup-entity this k))
       (-invoke [this k not-found]
                (lookup-entity this k not-found))

       IPrintWithWriter
       (-pr-writer [_ writer opts]
