Open solnic opened 13 years ago
See #1416
by Martin Gamsjaeger (snusnu)
(from [1f9b8bf0d97a2458b9721e5fa02a7f1f69fdcdf3]) Add failing spec for #count called on a limited collection
[#1334 state:confirmed] [#1203 state:confirmed] [#1416 state:confirmed] http://github.com/datamapper/dm-aggregates/commit/1f9b8bf0d97a2458b9721e5fa02a7f1f69fdcdf3
by Dan Kubb (dkubb)
(from [0b2afc96e4917e868853f3c9ddcc5c8f31ba58e5]) Mark #count on a limited collection spec as pending
[#1334 state:confirmed] [#1203 state:confirmed] [#1416 state:confirmed] http://github.com/datamapper/dm-aggregates/commit/0b2afc96e4917e868853f3c9ddcc5c8f31ba58e5
by Dan Kubb (dkubb)
This is related to the problem and fix posted over a year ago:
dkubb commented out the optimization of size calling count
to use Array#size to properly recognize :limit in the query.
If size recognizes :limit in the query, shouldn't count also?
For instance, dm-pager assumes this of count and breaks on queries with :limit:
(The root cause is probably do_mysql adapter not translating the query correctly.)
Created by Ming - 2010-02-24 20:34:11 UTC
Original Lighthouse ticket: http://datamapper.lighthouseapp.com/projects/20609/tickets/1203