Permalink
Browse files

Eliminate unneeded function in eager-fetch.

  • Loading branch information...
duelinmarkers committed Jan 14, 2012
1 parent 5b37c8b commit c8e4302913c5a50605b506623b0012f93d9fca9e
Showing with 1 addition and 2 deletions.
  1. +1 −2 src/clj_record/associations.clj
@@ -5,8 +5,7 @@
(defn eager-fetch [model-name foreign-key attribute-name records]
(let [fetched-records (core/find-records model-name
- {foreign-key (apply q/in (map (fn [record] (:id record))
- records))})]
+ {foreign-key (apply q/in (map :id records))})]
(map (fn [record]
(conj {attribute-name (filter (fn [fetched]
(= (:id record) (foreign-key fetched))) fetched-records)}

0 comments on commit c8e4302

Please sign in to comment.