Thanks for the example. If you can create a small tree of linked entities like that then I could help get it working with the nested lookups also.
I’m assuming every instance of ([:key1 val1] ... )
(i.e. “a list of map entries”) is really supposed to be a Clojure(/edn) map - is that just how you’re observing your maps when you retrieve them? Or are you intentionally working with these lists like this explicitly?
v2 SQL can’t do full recursion just yet, but you can query N-layers deep easily enough using CTEs - I shared an example in this other thread: XTDB's Sweet Spot - #9 by refset
Hope that helps!