getQuery() returns Query, not QueryBuilder