I wonder if iterator_to_array() calls getIterator() on the entity.