Php Laravel/Elount是否绕过了安全更新?

Php Laravel/Elount是否绕过了安全更新?,php,mysql,laravel,eloquent,safe-mode,Php,Mysql,Laravel,Eloquent,Safe Mode,我正在执行以下查询: $sql ='UPDATE Atable A INNER JOIN Btable B ON A.name=B.name SET A.field=1 WHERE B.field="wrong"; '; 其中B.field不是键列。 Workbench正确停止,但出现错误: Error Code: 1175. You

我正在执行以下查询:

        $sql ='UPDATE 
            Atable  A INNER JOIN 
            Btable  B ON A.name=B.name
        SET 
            A.field=1
        WHERE
            B.field="wrong"; '; 
其中B.field不是键列。 Workbench正确停止,但出现错误:

   Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column To disable safe mode, toggle the option in Preferences -> SQL Editor and reconnect.
但如果我用Laravel雄辩地执行上述查询:

 $affected = DB::update(DB::raw($sql2));
查询将运行,所以我缺少Eloquent的任何安全用法,或者通常需要小心,因为Eloquent将能够通过安全更新模式