Trying to figure out how to support joins with arbitrary tables without
needing to pass in an EntityManager (which might not be serializable).