spree/spree — Issue #709: Product scopes don't always return DISTINCT products
Author: fabien
Created: 2011-10-20 18:03:51+00:00
State: open

The product-scopes that yield INNER JOIN queries (with_option_value for example) don't return distinct products; instead a duplicate is returned for each occurrence in a variant.

The solution would be a :group => 'products.id' clause (GROUP BY).