Jason
unread,May 27, 2013, 10:03:44 AM5/27/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Korma
I have these 2 definitions, when I do the select on users, I get the
json parsed as json automatically, when I do (select posts (with
users)) I get back the posts with users, but the users did not run
the transform. Is there a way I can have the transform occur or am I
doing something wrong?
(defentity users
(pk :id)
(table :users)
(transform (fn [{json :json :as v}]
(if json
(assoc v :json (cheshire.core/parse-string json))
v)))
(database db))
(defentity posts
(pk :id)
(table :posts)
(belongs-to users {:fk :user_id})
(database db))