[JAVA-134] Find().limit(-100) should fail if less than 100 docs returned (100 docs > 4MB) Created: 17/Jul/10 Updated: 17/Jul/10 Resolved: 17/Jul/10 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | None |
| Affects Version/s: | 2.0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Scott Hernandez (Inactive) | Assignee: | Eliot Horowitz (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
If you set a negative limit and the number returned is less than requested an exception should be thrown. if (coll.find().limit(-100).getSizes()[0] != 100) //fail This should be an error since it is misleading and could break code that thinks it will get back that number; instead it will seem like there are less result than there actually are. |
| Comments |
| Comment by Eliot Horowitz (Inactive) [ 17/Jul/10 ] |
|
This is a feature and is meant to work as is. Any documentation for negative limits should say this for sure. |