The actual test:
(defparameter *model* (make-model (cl-json:decode-json-from-source #P"/tmp/json.test"))) (with-table (farmers :title "farmers" :model *model* :accessors ((farmer-name "Full name") (farmer-fruits "Fruits"))) (dolist (farmer (table-entities farmers)) (when (ppcre:scan "Bob" (farmer-name farmer)) (with-table (fruits :title "fruits" :model *model* :accessors ((fruit-name "Name")) :index t) (return (loop for fid in (farmer-fruits farmer) collect (fruit-name (iget fruits fid))))))))
The actual test:
The :accessors arguments is used to resolve field access once for all when visiting a table. If :index is true, we build a temporary hash-table based on identifiers.