donut-party / datapotato

better database fixtures for Clojure tests! 🥔
Other
121 stars 1 forks source link

Nested relations #5

Open gpind opened 1 year ago

gpind commented 1 year ago

It's possible to express simple collections of foreign keys via :constraints {:foo #{:coll}}, but what about a collection of maps containing foreign keys? For example:

:documents [{:id "1", :type "foo"}
            {:id "2", :type "bar"}]

This is a special case of nested relations. I saw this specmonstah issue, whose closing comment suggests an approach that I don't think applies to datapotato. Does datapotato support nested relations?

flyingmachine commented 1 year ago

Just wanted to let you know I've started looking into this