Wiki

Articles tagged with "has_many", sorted by viewsX
Displaying 1-4 of 4 result(s).

Displaying, sorting and filtering HasMany & ManyMany relations in CGridView

Created 3 years ago by yJeroenTutorials8 comments – viewed 55,574 times – ( +21 ) – version 1.1
This tutorial gives you multiple options of how to fully implement showing, sorting and filtering related data in gridviews.

Drills : Search by a HAS_MANY relation in Yii 1.1

Created 3 years ago by softarkTutorials13 comments – viewed 43,468 times – ( +33 ) – version 1.1
Sometimes we get lost trying to search by a HAS_MANY relation using CActiveRecord or CActiveDataProvider in Yii 1.1. This article is a series of drills that try to describe the practical techniques of searching by a HAS_MANY relation.

1:n relations sometimes require CDbCriteria.together

Created 4 years ago by fsbTips5 comments – viewed 35,421 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.

Drills : Search by a HAS_MANY relation in Yii 2.0

Created about a year ago by softarkTutorials4 comments – viewed 31,671 times – ( +19 ) – version 2.0
This article tries to describe the practical techniques of searching by a HAS_MANY relation using ActiveRecord of Yii 2.0.