#70 ✓resolved

Problems with counting when using priority_order_by

Reported by kgiszczak | March 23rd, 2009 @ 10:18 AM

Hi, this BUG is related to ticket #1.

When I want to use @search.priority_order_by = :dic_posting_status_id, page_links helper throw this error:

PGError: ERROR:  column "postings.dic_posting_status_id" must appear in the GROUP BY clause or be used in an aggregate function
: SELECT count("postings".id) AS count_id FROM "postings" INNER JOIN employer_accounts ON postings.employer_account_id = employer_accounts.id WHERE (("employer_accounts".company_type = E'Employer') AND ("employer_accounts".company_id = 2)) ORDER BY "postings"."dic_posting_status_id"

There is no need of using order by in counting statement.

(Exactly the same problem was in ticket #1, but for standard 'order_by' option)

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Provides common named scopes and object based searching.

People watching this ticket