How to do dynamic table joins using ecto?

Alternate workaround with caveats here.