8000 Does not work with counter_cache · Issue #126 · jesjos/active_record_upsert · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Does not work with counter_cache #126
Open
@hrdwdmrbl

Description

@hrdwdmrbl

Rails version 6

When upserting, association counter caches do not get incremented.

It looks like counter caches do not get incremented with normal callbacks: https://github.com/rails/rails/blob/v6.1.5/activerecord/lib/active_record/counter_cache.rb#L165

I fixed it by incrementing the counters myself but it feels bad :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0