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

An easy way to use escopes and CActiveDataProvider

Created 4 years ago by Rafael GarciaTips8 comments – viewed 25,500 times – ( +1 / -1 ) – version 1.1
Often used scopes to define criteria in our models. This is a very useful feature as it ensures that in any part of application applying the criteria defined by the scope when called it.

Using updateAll and deleteAll with scopes

Created about a year ago by le_topHow-tos4 comments – viewed 16,718 times – ( +5 ) – version 1.1
Using CActiveRecord->updateAll() and CActiveRecord->deleteAll() with scopes and criteria requires some tricks that are explained in this article. While findAll() , find() and some other methods use scopes automatically, updateAll() and deleteAll() do not.