1
类别和点播水化
使用阵列的集合,而不是优点是波轮可以按需滋润模型对象。使用此功能,您在检索大量结果时绝不会失去内存。可通过模型的查询的setFormatter()方法,按需水化很容易引发:php(propel)中的collection和array有什么区别?
<?php
$authors = AuthorQuery::create()
->limit(50000)
->setFormatter(ModelCriteria::FORMAT_ON_DEMAND)
->find();
foreach ($authors as $author) {
echo $author->getFirstName();
}
1)什么是“水化”在这里的意思吗?
2)集合和数组有什么区别?
来源:Propel @1.6