   "Returns id, resolving lookup refs (vectors of the form `[attribute value]`) to ids. Lookup refs are only supported for indexed attributes.
   Arity 3 is for known lookup refs, and does not check for uniqueness."
   ([db-snap attr val]
-   (log-read [:attr-val] conj [nil attr val])
+   (log-read [:_av] conj [nil attr val])
    (first (get-in* db-snap [:ave attr val])))
   ([db-snap id]
    (if ^:boolean (vector? id)

  (str (uuid-utils/make-random-uuid)))

(def blank-access-log
  {:id          #{}
   :attr        #{}
   :attr-val    #{}
   :entity-attr {}})

(defn access-log-patterns
  "Returns vector of access log patterns, pruning overlapping patterns"
  [{ids :id attr-vals :attr-val entity-attrs :entity-attr attrs :attr }]
  (apply set/union
         ids
         attr-vals

  "Get attribute in entity with given id."
  ([db-snap id attr]
   (when-let [id (resolve-id db-snap id)]
     (log-read [:ea_ id] fnil-conj-set [id attr])
     (get-in* db-snap [:eav id attr])))
  ([db-snap id attr not-found]
   (when-let [id (resolve-id db-snap id)]
     (log-read [:ea_ id] fnil-conj-set [id attr])
     (get-in* db-snap [:eav id attr] not-found))))

(defn get-in
  "Get-in the entity with given id."
  ([db-snap id ks]
   (when-let [id (resolve-id db-snap id)]
     (log-read [:ea_ id] fnil-conj-set [id (first ks)])
     (-> (get-in* db-snap [:eav id])
         (get-in* ks))))
  ([db-snap id ks not-found]
   (when-let [id (resolve-id db-snap id)]
     (log-read [:ea_ id] fnil-conj-set [id (first ks)])
     (-> (get-in* db-snap [:eav id])
         (get-in* ks not-found)))))

