私は、ユーザーモデル内の他のテーブルからデータを取得するために関数 find('list') を使用して固執したCakephpの新機能です。例私はユーザーモデルにグループのリストを取得させたいと思っていますが、グループにはテーブル「グループ」がありますが、グループコントローラーとグループモデルのphpファイルを作成したくありません。
<?php
//User model
class User extends AppModel {
public function getGroupList() {
/* Here i want return list all group by use function find('list')
* but group has table name "groups" and i don't want use sql query string.
* Note that group i don't create files php in controller and model.
*/
}
}
?>