[SERVER-7884] The length of arrays should be exposed as a querieable and selectable attribute Created: 08/Dec/12  Updated: 15/Feb/13  Resolved: 09/Dec/12

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Major - P3
Reporter: Yuri Finkelstein Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-478 Advanced $size quering Closed
Participants:

 Description   

Today the length of the arrays in mongodb documents is not exposed for querying or retrieving. There are many situation where one needs to add to array only if its length is less than N or is a specific size. In the absence of this feature not only one needs to fetch the list first and make a decision on the client, it's impossible to do it atomically. I believe it's a natural attribute to expose and it's fairly easy to.



 Comments   
Comment by Eliot Horowitz (Inactive) [ 09/Dec/12 ]

You can query on the size of the array, (using $size)
There is another case SERVER-478 to extend this.

Generated at Thu Feb 08 03:15:51 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.