Skip to content
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.

Unexpected behavior when count is used with - #9

Open
solnic opened this issue May 17, 2011 · 4 comments
Open

Unexpected behavior when count is used with - #9

solnic opened this issue May 17, 2011 · 4 comments

Comments

@solnic
Copy link
Contributor

solnic commented May 17, 2011

suppose a and b are collections return by finders on a class A:

suppose (a - b).count == 5

suppose we have a chained finder which returns only a subset of items of A:

(a - b).my_filter.count should be <= (a - b).count, but it is actually larger.

See the test case here:

https://gist.github.com/3569c20a3bf30f269699


Created by Matt - 2010-11-13 02:18:34 UTC

Original Lighthouse ticket: http://datamapper.lighthouseapp.com/projects/20609/tickets/1446

@solnic
Copy link
Contributor Author

solnic commented May 17, 2011

Confirmed - I have this very issue. :-\

by mephux

@solnic
Copy link
Contributor Author

solnic commented May 17, 2011

I’ve slightly fixed the example script so it won’t give a false negative when the bug is fixed, and also to use a memory DB:

https://gist.github.com/7fd9e5fe4362dd325092

by Jonathan Stott (namelessjon)

@solnic
Copy link
Contributor Author

solnic commented May 17, 2011

I have a similar issue and created a test case for it here: https://gist.github.com/700986

by Robert Sköld

@solnic
Copy link
Contributor Author

solnic commented May 17, 2011

[bulk edit]

by Dan Kubb (dkubb)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant