Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lack of GROUP BY clause cause postgres error #9

Open
lukkry opened this issue Jun 2, 2012 · 0 comments
Open

Lack of GROUP BY clause cause postgres error #9

lukkry opened this issue Jun 2, 2012 · 0 comments

Comments

@lukkry
Copy link

lukkry commented Jun 2, 2012

When I combine in_taxons scope with sort by master_price (using spree 1.1.1) I get postgres error:

searcher = Spree::Core::Search::ProductGroupBase.new(:product_group_query =>"in_taxons/Mugs/ascend_by_master_price")
searcher.retrieve_products

# ActiveRecord::StatementInvalid: PG::Error: ERROR:  column "spree_variants.price" must appear in the GROUP BY clause or be used in an aggregate function

full log: https://gist.github.com/2858938

You can see this error, when you install fresh spree 1.1.1 shop and try to access url http://localhost:3000/s/in_taxons/Mugs/ascend_by_master_price

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

No branches or pull requests

1 participant