使用关联模型 报错 Class 'Admin\Model\SELF' not found

浏览:1421 发布日期:2014/12/30 分类:求助交流
php5.4.34环境。使用了关联模型:
MemberModel.class.php:
<?php

namespace Admin\Model;

use Think\Model\RelationModel;

/**
* 文档基础模型
*/
class MemberModel extends RelationModel {

// 关联表
protected $_link = array (
'shop' => array (
'mapping_type' => SELF::BELONGS_TO,
'foreign_key' => 'shopID',
'mapping_name' => 'shop',
'mapping_fields' => 'name' ,
)
);


}

代码里 $model=D('Member');页面报错:
Class 'Admin\Model\SELF' not found
错误位置
FILE: D:\web\test_swhj\ThinkPHP\Common\functions.php  LINE: 498
ThinkPHP3.2.2 { Fast & Simple OOP PHP framework } -- [ WE CAN DO IT JUST THINK ]
各位帮忙看看是哪里的问题?
最佳答案
评论( 相关
后面还有条评论,点击查看>>