think-orm icon indicating copy to clipboard operation
think-orm copied to clipboard

关联模型的输出使用append时,会把关联模型的全部字段输出到数组中

Open lg970044 opened this issue 3 years ago • 1 comments

关联模型的输出使用append时,会把关联模型的全部字段输出到数组中

$obj->append(['goods.xxx'])->visible(['id', 'goods.no', 'goods.title'])->toArray();

理想的输出 是 把 xxx 这个读取器的 属性 加到 goods 数组中,实际会把 所有 goods 的字段 都 输出到数组。

lg970044 avatar Oct 17 '22 08:10 lg970044

建议官方解决visible 在toArray 2次无效的问题,顺便就修复了此bug

Hairow avatar Dec 25 '22 13:12 Hairow