Add Cast to UntypedApi
Add support for batch loading of references in multi select queries.

Only adds 1 additional query per reference.