-
Edouard CHIN authored
- At the moment, `delete_all` doesn't support `WITH`, `WITH RECURSIVE` and `DISTINCT` statement. Calling `Post.with(ex: Post.where(title: "")).delete_all` raises an error. However calling `Post.with(ex: Post.where(title: "")).update_all` executes the following SQL `UPDATE "posts" SET "title" = blabla`, which can be surprising for users. This commit adds a deprecation message to warn users that those statements have no effect, with the intention of raising the same error as when using `delete_all` in a future Rails release.
Edouard CHIN authored- At the moment, `delete_all` doesn't support `WITH`, `WITH RECURSIVE` and `DISTINCT` statement. Calling `Post.with(ex: Post.where(title: "")).delete_all` raises an error. However calling `Post.with(ex: Post.where(title: "")).update_all` executes the following SQL `UPDATE "posts" SET "title" = blabla`, which can be surprising for users. This commit adds a deprecation message to warn users that those statements have no effect, with the intention of raising the same error as when using `delete_all` in a future Rails release.
Loading