Undefined class constant 'self::BELONGS_TO'

浏览:4535 发布日期:2014/03/27 分类:求助交流 关键字: undefine constant
namespace Home\Model;

use Think\Model\RelationModel;

/**
* 分类模型
*/
class TeacherCourseModel extends RelationModel{

protected $tablePrefix = 'jj_';
protected $dbName = 'diyitidb';

protected $_link = array(
'Teacher'=>array(
'mapping_type' => self::BELONGS_TO,
'class_name' =>'Teacher',
'foreign_key' =>'teacher_id',
// 'as_fields' => 'firstname,sex,birth_province,religion_status,birth_year,work_status,create_time,num_agreement,education',

)
);

我的模型已经继承了,妹子求各位大神指教TAT
最佳答案
评论( 相关
后面还有条评论,点击查看>>