一对多 查询不能访问

浏览:721 发布日期:2013/08/16 分类:求助交流 关键字: 一对多 查询
class CustomerRelationModel extends RelationModel{
    protected $tableName = 'customer';
    public $_link = array(
        'linkman' => array(
            'mapping_type'            => HAS_MANY, 
            'class_name'            => 'linkman',
            'foreign_key'            => 'companyId',    
            'mapping_name'            => 'linkmans',    
            'mapping_fields'        => 'id, name, jobs , mobile'
            )
    );
}
这个代码只能查询customer中的字段不能查询子表中的数据
最佳答案
评论( 相关
后面还有条评论,点击查看>>