一对一关联

public function getGoodName(){
return $this->belongsTo('app\api\model\goods\Good','goods_good_id','id', [], 'LEFT')->setEagerlyType(0);
}

以少查多

public function getGoodName(){
return $this->belongsTo('app\api\model\goods\Good','goods_good_id','id');
}

相关文章:

  • 2022-01-17
  • 2021-11-28
  • 2022-12-23
  • 2022-12-23
  • 2021-06-15
  • 2021-06-27
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-29
  • 2022-12-23
  • 2022-01-16
  • 2021-11-30
相关资源
相似解决方案