swoft-cloud / swoft

🚀 PHP Microservice Full Coroutine Framework
https://swoft.org
Apache License 2.0
5.58k stars 786 forks source link

swoft 使用数据库模型查询数据时,设置隐藏字段不生效 #1336

Open woodost opened 4 years ago

woodost commented 4 years ago

$brands = Brand::new()->setModelHidden(['updated_at'])->where($where)->get()->toArray();

如上代码: 在查询数据库时,设置掩藏updated_at字段,结果不生效,所有数据都返回了

sakuraovq commented 4 years ago

https://github.com/swoft-cloud/swoft-component/pull/595/commits/5559a7c53f74f54c02f063d08899d0d7b81427f2