top-think / think-orm

Think ORM——the PHP Database&ORM Framework
Apache License 2.0
413 stars 171 forks source link

使用查询范围后,报错:delete without condition、miss update condition #622

Closed jesuer closed 2 weeks ago

jesuer commented 2 weeks ago

3.0.14 升级到3.0.24后

删除使用:User::scope('user')->scope('age',10)->delete(); 出现错误:delete without condition

更新使用:User::scope('user')->scope('age',10)->update(['name'=>'张三']); 出现错误:miss update condition

但使用 User::scope('user')->scope('age',10)->fetchsql(true)->delete(); 得到的SQL语句是没问题的

使用:User::scope('user')->where('age',10)->delete(); 则没问题

请问是不支持多scope一起使用了吗?

liu21st commented 2 weeks ago

已经修正了