#1334 confirmed
Gary Yngve

incorrect sql for limit + count (DM 1.0)

Reported by Gary Yngve | June 22nd, 2010 @ 11:55 PM | in 1.1.1

In DM 1.0, the expression Foo.all(:limit=>2).count
produces the query
SELECT COUNT(*) FROM foos LIMIT 2
which is incorrect, as the precedence of LIMIT applies to the one row
returned by count.
This is a big deal with many pagination plugins.

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 »

Attachments

Referenced by

Pages