Eloquent高级子查询时提示错误
$list = Order::select(['id'])->addSelect([
'goods_nums' => OrderDetail::whereColumn('order_id', 'order.id')->sum('num')
])->get();
PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'order.id' in 'where clause'
Webman-framework v1.5.6
直接 hasMany 查出来 再处理