O Guia Definitivo do Yii 1.1
O Guia Definitivo do Yii 1.1
O Guia Definitivo do Yii 1.1
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
• Added support for profiling SQL executions<br />
• Profiling SQL Executions<br />
• Added support for logging additional context information<br />
• Logging Context Information<br />
• Added support for customizing a single URL rule by setting its urlFormat and<br />
caseSensitive options:<br />
• User-friendly URLs<br />
• Added support for using a controller action to display application errors:<br />
• Handling Errors Using an Action<br />
Version 1.0.5<br />
• Enhanced active record by supporting named scopes. See:<br />
• Named Scopes<br />
• Default Named Scope<br />
• Relational Query with Named Scopes<br />
• Enhanced active record by supporting lazy loading with dynamic query options. See:<br />
• Dynamic Relational Query Options<br />
• Enhanced CUrlManager to support parameterizing the route part in URL rules. See:<br />
• Parameterizing Routes in URL Rules<br />
Atualizan<strong>do</strong> a versão 1.0 para <strong>1.1</strong><br />
Changes Related with Model Scenarios<br />
• Removed CModel::safeAttributes(). Safe attributes are now defined to be those that<br />
are being validated by some rules as defined in CModel::rules() for the particular<br />
scenario.<br />
• Changed CModel::validate(), CModel::beforeValidate() and CModel::afterValidate().<br />
CModel::setAttributes(), CModel::getSafeAttributeNames() The 'scenario' parameter<br />
is removed. You should get and set the model scenario via CModel::scenario.<br />
• Changed CModel::getValidators() and removed CModel::getValidatorsForAttribute().<br />
CModel::getValidators() now only returns validators applicable to the scenario as<br />
specified by the model's scenario property.<br />
• Changed CModel::isAttributeRequired() and CModel::getValidatorsForAttribute(). The<br />
scenario parameter is removed. The model's scenario property will be used, instead.<br />
• Removed CHtml::scenario. CHtml will use the model's scenario property instead.<br />
Changes Related with Eager Loading for Relational Active Record<br />
• By default, a single JOIN statement will be generated and executed for all relations<br />
involved in the eager loading. If the primary table has its LIMIT or OFFSET query<br />
option set, it will be queried alone first, followed by another SQL statement that brings<br />
back all its related objects. Previously in version 1.0.x, the default behavior is that<br />
there will be N+1 SQL statements if an eager loading involves N HAS_MANY or<br />
MANY_MANY relations.<br />
Changes Related with Table Alias in Relational Active Record<br />
• The default alias for a relational table is now the same as the corresponding relation<br />
name. Previously in version 1.0.x, by default <strong>Yii</strong> would automatically generate a table