多对多关联模型中间表插入不进去

浏览:586 发布日期:2016/09/25 分类:求助交流
<?php
class BlogRelationModel extends RelationModel{
    protected $tableName = 'blog';
    Protected $_link = array(
        'attr'  =>  array(
            'mapping_type'   =>  MANY_TO_MANY,
            'foreign_key'   =>  'bid',
            'relation_foreign_key'  =>  'aid',
            'relation_table'    =>  'hd_blog_attr'
        )
    );
}
查询了一下sql语句,只执行了insert hd_blog这个,中间表hd_blog_attr根本就没执行
最佳答案
评论() 相关
后面还有条评论,点击查看>>