Query::toArray() with relations