<?php
class ExpertiseModel extends RelationModel {

    protected $_link=array(
            'Role'=> array(
                    'mapping_type'=>BELONGS_TO,
            
                     'foreign_key'=>'rid',            //主表在中间表中的关联字段名称   就是Expertise表的外键
                     'relation_key'=>'id',            //副表在中间表中的关联字段名称   就是Role表的主键
                    'mapping_name'=>'user_maping',
                    'mapping_fields'=>'name',
                    'as_fields'=>'name',
            ),

    );

}

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-01
猜你喜欢
  • 2021-12-15
  • 2021-05-20
  • 2021-09-08
  • 2021-11-29
  • 2022-12-23
  • 2021-06-15
  • 2022-12-23
相关资源
相似解决方案