Classical example:
group hasMany user
user hasOne group
i’d like to create group.user_count as a stat relation using COUNT(user.id)
What’s the new way?
Classical example:
group hasMany user
user hasOne group
i’d like to create group.user_count as a stat relation using COUNT(user.id)
What’s the new way?
Found a wiki, now I’ll study if this is my case
http://www.yiiframework.com/wiki/621/filter-sort-by-calculated-related-fields-in-gridview-yii-2-0/