UserTb::find().lock_shared().build(DatabaseBackend::MySql).to_string()) generates the wrong SQL statement for the old version of MySQL: SELECT `user_tb`.`id`, `user_tb`.`created_time`, ...
こんばんは!今日は祝日にもかかわらず、仕事でデータベース関連のトラブルに遭遇しました。せっかくの休日出勤で得た経験を無駄にしたくないので、この記事にまとめることにしました。同じような問題で困っている方の助けになれば幸いです。
When using aliases in DELETE queries with JOINs in MySQL, Knex generates incorrect SQL syntax. The generated query includes the full table declaration with alias in the DELETE clause, but MySQL ...