谁能解决这个关联关系?

浏览:249 发布日期:2016/11/14 分类:求助交流
tp_vip:id,name,tel,address,pid,time,remark 
  tp_product:id,type,number,status
关系:pid记录product表的id.
现在想操作:vip表发布信息,同时把product表的status 的值改变为1,默认是0class VipRelationModel extends RelationModel{

protected $tableName='vip';//定义主表

protected $_link=array(
           'product'=> array(  
     'mapping_type'=>BELONGS_TO,
          'class_name'=>'product',
          'foreign_key'=>'pid',
          'mapping_name'=>'product',


      )


    );

}

 ?>
写了一个关联模型,主表成功,副表更改不了,有什么办法吗?
最佳答案
评论( 相关
后面还有条评论,点击查看>>