Findall And Default Sort

Is there a way to ‘share’ the default sort with the ‘findAll’ method() ?

I use the findAll to build dropdown, and I’d like to avoid to explicit every time the sort, because if we change the default sort I’ll go out crazy for modify every findAll related to a specific model…

Hi,

you have to add one method in Model class to achieve your requirment

/**


 *


 * @return  array contains scope for sorting


 */


public function defaultScope()


{


	return array(


		'order'=>'mod_num,mod_name ASC',


	);


}