QueryBuilder rewrite where, andWhere logic