Hi Gary,

On Dec 9, 3:23 am, "Gary Yngve" <[EMAIL PROTECTED]> wrote:
> With dm-aggregates, size does not produce the expected answer with a query
> containing limit.
>
> >> Thing.all(:limit=>2).map{1}.size   # my new fave idiom until this bug is

In the meantime you should be able to use:

  Thing.all(:limit=>2).to_a.size   # my new fave idiom until this bug
is

Can you create a ticket with this issue in our bug tracker:

  http://datamapper.lighthouseapp.com/

If you can include a stand-alone script that duplicates the problem.
Here's an example script:

  http://gist.github.com/29902

Failing specs are also welcome, but a stand-alone script is usually
enough for us to track down the issue, create the specs ourselves, and
then verify the fixes.  It would be nice to have a few of the failing
scenarios outlined.

I'm wondering if perhaps aliasing Collection#size to Collection#count
is a bit premature.  Obviously we need alot more test cases to ensure
the results are correct.  Worst case we'll remove it prior to the next
release, but I'll see what I can do about fixing it on edge first.

Dan
(dkubb)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to