Collections And On-Demand Hydration
The advantage of using a collection instead of an array is that Propel can hydrate model objects on demand. Using this feature, you'll never fall short of memory when retrieving a large number of results. Available through the setFormatter() method of Model Queries, on-demand hydration is very easy to trigger:
<?php
$authors = AuthorQuery::create()
->limit(50000)
->setFormatter(ModelCriteria::FORMAT_ON_DEMAND)
->find();
foreach ($authors as $author) {
echo $author->getFirstName();
}
1) What is the meaning of "Hydration" here?
2) what is the difference between collection and array?
Source : Propel @1.6