 (def venues-by-id (id-doc-map (select venues)))
 (def shows-by-id  (id-doc-map (select shows)))
 (def tracks-by-id (id-doc-map (select tracks)))
-(def api_clients-by-id (id-doc-map (select api_clients)))
+(def api-clients-by-id (id-doc-map (select api_clients)))
 (def users-by-id (id-doc-map (select users)))
+
+;; idea: use transform to make column names unique
 
 (defn join-by-id
   "Join in-memory models. Iterate the primary collection and set a key for each matching lookup-collection model."

                  [pid (assoc pm pkey (get lcoll (get pm lkey)))])
                pcoll)))

(pprint (select-keys (-> (join-by-id shows-by-id venues-by-id :venue :venue_id) (join-by-id tours-by-id :tour :tour_id)) [891]))

(defn -main
  "I don't do a whole lot ... yet."

;t.datetime "updated_at"

(defentity plays
  (entity-fields :id :user_id :track_id :api_client_id :source :created_at)
  (belongs-to users {:fk :user_id})
  (belongs-to tracks {:fk :track_id})
  (belongs-to api_clients {:fk :api_client_id}))
