Skip to content
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.

Incorrect query when counting has n, :through relationships. #17

Open
postmodern opened this issue Feb 1, 2012 · 1 comment
Open

Incorrect query when counting has n, :through relationships. #17

postmodern opened this issue Feb 1, 2012 · 1 comment

Comments

@postmodern
Copy link
Member

I've reproduced a bug where dm-aggregates would not generate a GROUP BY clause to remove duplicate entries when counting a has n, :through relationship, thus resulting in inflated numbers.

git clone https://github.com/postmodern/dm-bug-report.git -b relationship_count
cd dm-bug-report/
bundle install
ruby bug.rb
DEBUG=true ruby bug.rb
@postmodern
Copy link
Member Author

@dkubb is working on a patch for this (https://gist.github.com/67bb96fec0fbae59e505) and will likely be included in the 1.3.0 release.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant