     fetch-options-object))
 
 
-(defn- entity->properties [raw-properties]
+(defn- entity->properties [raw-properties clj-properties]
   (reduce (fn [m [k v]]
-            (assoc m
-              (keyword k)
-              (coerce-java-type v)))
+            (let [k (keyword k)]
+             (assoc m k (if (contains? clj-properties k)
+                            (binding [*read-eval* false]
+                              (read-string (.getValue v)))
+                            (coerce-java-type v)))))
           {}
           raw-properties))
 

                     {:keys [kind]
                      :or {kind (unqualified-name name)}}]
  (let [key-property-name (first (filter #(= (:tag (meta %)) :key) properties))
        key-property (if key-property-name (keyword (str key-property-name)) nil)]
    `(defrecord ~name ~properties
       EntityProtocol
       (get-key-object [this#]
         (get-key-object-helper this# ~key-property ~kind nil))
       (get-key-object [this# parent#]

              model-record (record entity-record-type)]
          (map #(let [v (.getValue %)]
                  (with-meta
                    (merge model-record
                           (entity->properties (.getProperties v)
                                               (get-clj-properties model-record)))
                    {:key (.getKey v)}))
               entities))
        ;; handles singleton values
