    entity fields like `:transforms` or `:table`, if need be."
   {})
 
+(defmacro -sel-select
+  "Internal macro used by `sel` (don't call this directly).
+   Generates the korma `select` form."
+  [entity & forms]
+  (let [[entity field-keys] (entity-field-keys default-fields entity)
+        forms (->> forms
+                   sel-apply-kwargs
+                   (sel-apply-fields field-keys))]
+    `(do (when *log-db-calls*
+           (println "DB CALL: " ~(str entity) " " ~(str forms)))
+         (select (merge (entity->korma ~entity) *entity-overrides*) ~@forms))))
+
+(defmacro sel-fn
+  "Returns a memoized fn that calls `sel`."
+  [one-or-many entity & forms]
+  `(memoize
+    (fn []
+      (sel ~one-or-many ~entity ~@forms))))
+
+
+;; ## INS
+
 (defmulti pre-insert
   "Gets called by `ins` immediately before inserting a new object immediately before the korma `insert` call.
    This provides an opportunity to do things like encode JSON or provide default values for certain fields.

                           (clojure.set/rename-keys {(keyword "scope_identity()") :id}))]
      (sel :one entity :id id))))

(defmacro -sel-select
  "Internal macro used by `sel` (don't call this directly).
   Generates the korma `select` form."
  [entity & forms]
  (let [[entity field-keys] (entity-field-keys default-fields entity)
        forms (->> forms
                   sel-apply-kwargs
                   (sel-apply-fields field-keys))]
    `(do (when *log-db-calls*
           (println "DB CALL: " ~(str entity) " " ~(str forms)))
         (select (merge (entity->korma ~entity) *entity-overrides*) ~@forms))))

(defmacro sel-fn
  "Returns a memoized fn that calls `sel`."
  [one-or-many entity & forms]
  `(memoize
    (fn []
      (sel ~one-or-many ~entity ~@forms))))

(defmacro exists?
  "Easy way to see if something exists in the db.

  (delete entity (where (apply assoc {} kwargs)))
  {:status 204
   :body nil})


;; ## SEL

(defmulti post-select
  "Called on the results from a call to `sel`. Default implementation doesn't do anything, but
