Wiki

Articles tagged with "1:n", sorted by ratingX
Displaying 1-1 of 1 result(s).

1:n relations sometimes require CDbCriteria.together

Created about a year ago by fsbTips4 comments – viewed 13,795 times – ( +13 )
There are situations in which Active Record will generate nonsense queries from what a nieve Yii user might think is reasonable code. One such situation is a CActiveDataProvider using CDbCriteria to get data from parent and 1:n child table with a condition on the child table.