You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found out additional issue in Rails 7.2 with counter_cache where this gem overrides the update_all method in #223 which then calls
UPDATE posts SET comments_count =NULLWHERE ...
instead of
UPDATE posts SET comments_count = COALESCE(comments_count, 0) + $1WHERE ...
at least in Rspecs we could observe this behavior. This is because the Arel::Node::Addition object is being type-casted by the Integer class (in sanitize_sql_for_assignment method) and since it is an object and not a number, it is sanitized to NULL instead of the valid SQL syntax.
I had activerecord-multi-tenant referenced in my Gemfile but did not actually use it.
It broke when I updated my application to Rails 7.2.
Removing the gem fixed my application. So there must be some problem with the gem with this latest Rails version.
The text was updated successfully, but these errors were encountered: