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

croak when trying to order by average_rating #42

Open
SysPete opened this issue Jun 13, 2016 · 0 comments
Open

croak when trying to order by average_rating #42

SysPete opened this issue Jun 13, 2016 · 0 comments

Comments

@SysPete
Copy link
Member

SysPete commented Jun 13, 2016

Hook error: DBIx::Class::Storage::DBIHacks::_group_over_selection(): Unable to programatically derive a required group_by from the supplied order_by criteria. To proceed either add an explicit group_by, or simplify your order_by to only include plain columns (supplied order_by: 'average_rating') at /home/apm/git/Interchange6-Demo-Shop/DanceShop/bin/../lib/DanceShop.pm line 449
 at /home/apm/.perlbrew/libs/perl-5.20.3@main/lib/perl5/Dancer2/Plugin.pm line 533.

/home/apm/git/Interchange6-Demo-Shop/DanceShop/bin/../lib/DanceShop.pm around line 449


444     # grid view can look messy unless we deliver products in nice rows of

445     # three products per row

446 

447     if ( $results_handler->view eq 'grid' ) {

448         my @grid;

449         my @products = $products->all;

450         while ( my @row = splice( @products, 0, 3 ) ) {

451             push @grid, +{ row => \@row };

452         }

453         $tokens->{products} = \@grid;

454     }
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