开发者

php activerecord problem : 'ActiveRecord\RecordNotFound' with message 'Couldn't find Setting without an ID'

开发者 https://www.devze.com 2023-04-05 21:13 出处:网络
i am using php activerecord in my own mvc framework. i extends AppModel from \\ActiveRecord\\Model class AppModel extends \\ActiveRecord\\Model

i am using php activerecord in my own mvc framework.

i extends AppModel from \ActiveRecord\Model

class AppModel extends \ActiveRecord\Model
{

}

and other models extends from AppModel

class Setting extends AppModel
{
    static $table_name = 'setting';     
}

get an err开发者_运维问答or :

Fatal error: Uncaught exception 'ActiveRecord\RecordNotFound' with message 'Couldn't find Setting without an ID'

how can i solve this problem ?


How about removing the leading slash from your class declaration?

class AppModel extends ActiveRecord\Model {

}
0

精彩评论

暂无评论...
验证码 换一张
取 消