I just came across Yii and it looks very promising. Now I have three questions about ActiveRecord:
I read somewhere that there is a feature like named_scope in rails but couldn't find it. Can anyone give me a hint?
My second question is: Is there something like Rails Programmer has_many :projects, :through => :assignments in Yii? (If you don’t know what this is: It’s like a many to many associations between Programmer and Project. They are associated through an Assignment)
And my last question: When a User has many Posts and a post belongs to a User, is something like this possible:
named_space: We don't have this concept. The implementation is pretty straightforward, however, since Yii has CDbCriteria, which represents everything needed by a query. And one may set up a mapping between scope names and and criterias. We may consider building this into the core in the near future.
has_many through: While Yii supports many-to-many association, it doesn't support this for the moment. I think it's a good idea that we support this in future.
The query conditions need to be specified in relations(). For on-the-fly query condition like you described, Yii only supports it in an eager approach currently: