[SERVER-9369] my join workaround has different behavior on different mongo versions Created: 17/Apr/13 Updated: 10/Dec/14 Resolved: 19/Apr/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | 2.4.1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | telman shahbazov | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
telman@telman:~$ uname -a |
||
| Issue Links: |
|
||||||||
| Operating System: | ALL | ||||||||
| Steps To Reproduce: | the structure of documents is below. > db.common.findOne( {forms:"period"}) , , , , "query_two":function(searchObject){ periods = []; , , ).forEach(function(v) { periods.push(v.period); }) } db.common.find(query_one) > db.common.find(query_one) query = query_two( {"member" : ObjectId("4fe806fae5ce67fd6218dda6")}) } db.common.find(query) |
||||||||
| Participants: | |||||||||
| Description |
|
I used the following query at mongo version 2.2.3 as a workaround to provide join. but since 2.4.1 the following query give an error message : JavaScript execution failed: ReferenceError: db is not defined near 'result = db.dataBankOrganizationStatus.c' (line 3) I catched the above error msg on Java Driver aplication side. so now I have developed new function for the same puporse (query_two) that calculate and return the query bson object. is the above mentioned message an expected behavior for the 2.4.1 and next mongo versions or it is really an error? Thanks in advance
|
| Comments |
| Comment by Daniel Pasette (Inactive) [ 19/Apr/13 ] |
|
This change was required for security. See: |
| Comment by Daniel Pasette (Inactive) [ 19/Apr/13 ] |
|
The ability to use global properties such as "db" was removed in 2.4. Please see the release notes: |