moiristo / deep_cloneable

This gem gives every ActiveRecord::Base object the possibility to do a deep clone that includes user specified associations.
MIT License
785 stars 89 forks source link

problem with counter_cache #149

Open NazarK opened 1 year ago

NazarK commented 1 year ago

if association is in "include" option, counter_cache field should be in "except" option, otherwise counter_cache field is multiplied by 2 and doesnt represent actual number of associated records (maybe should be mentioned in docs or managed automatically if possible)

moiristo commented 1 year ago

Hi, thanks for the feedback! As it is part of the configuration of associations, I think I agree it should be managed automatically. Will have a look when I have the time. PRs are welcome too ;)