(a | b )&c 官方文档没有具体讲到,又没有太多时间来看源码.经过尝试, (a | b) and c (a or b) and c 都是可以的. 而 (a | b) &c 是不行的 (a or b)&c 也不行. ===================== 后记:上面的错了.peewee的Model.get不支持条件的or操作. and操作用逗号代替. ======= 备注:or可以写进去,但出来的东西很奇怪 and也可以连着写.出来的结果不对. -------------…
一对一关联 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',…