开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜