Wiki

Articles tagged with "together", sorted by date (updated)X
Displaying 1-2 of 2 result(s).

Relational Query - Lazy Loading and Eager Loading / with and together

Updated 5 months ago by softarkTutorials9 comments – viewed 17,856 times – ( +13 ) – version 1.1
It's well known that there are Lazy Loading approach and Eager Loading approach in the relational query. But it's important to note that you should distinguish 2 different modes in the Eager Loading in Yii 1.1.x.

1:n relations sometimes require CDbCriteria.together

Updated 9 months ago by fsbTips5 comments – viewed 26,089 times – ( +16 ) – version 1.1
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.