Extends QueryObject with the possibility to query via lookups