Yii 是一个高性能的PHP5的web应用程序开发框架。通过一个简单的命令行工具 yiic 可以快速创建一个web应用程序的代码框架，开发者可以在生成的代码框架基础上添加业务逻辑，以快速完成应用程序的开发。
We are very pleased to announce the immediate availability of Yii Framework version 1.1.9. In this release, we've included nearly 60 enhancements and bug fixes.
For the complete list of changes in this release, please see the change log and important feature additions. And if you plan to upgrade from an older version to 1.1.9, refer to the upgrade instructions.
In the following page, we briefly introduce some of the changes in this release.
Active Record though option was introduced in 1.1.7 but syntax wasn't convenient so we decided toit more definitive. Current syntax is the following:
In the above array('key1'=>'key2'):
through can be used with both HAS_ONE and HAS_MANY relations.
For more details and examples refer to Relational Query with through.
You can now use scopes when defining AR model relations such
'recentApprovedComments'=>array(self::BELONGS_TO, 'Post', 'post_id', 'scopes' => array('approved', 'recent')),
In case of a single scope you can specify a single scope with a string instead of array.
It is now possible to build AR relations on PK->FK specified instead of relying on the schema defaults so you can specify AR relation like the following declaration for Day model:
''=>array(self::HAS_MANY, 'Job', array(' ' => 'target_date')),
In the case above Day can have multiple Jobs but these aren't related usual way. We've specified relation key in form of array('fk'=>'pk'). That means it will generate SQL like
SELECT * FROM day t JOIN job ON t.date = job.target_date