Wiki

Articles tagged with "together"X
Displaying 1-2 of 2 result(s).

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

Created about a year ago by softarkTutorials10 comments – viewed 19,562 times – ( +14 ) – 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

Created 3 years ago by fsbTips5 comments – viewed 27,299 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.