[SERVER-612] Allow Arbitrary Properties on DBRefs Created: 08/Feb/10 Updated: 12/Jul/16 Resolved: 17/Feb/10 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | JavaScript |
| Affects Version/s: | None |
| Fix Version/s: | 1.3.3 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Vinny Fiano | Assignee: | Aaron Staple |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Participants: | |||||||||||||
| Description |
|
DBRefs are supposed to be informal, allowing arbitrary properties in addition to $ref, $db, and $id. The database stores them correctly, but the JavaScript shell silently drops them from output. This can be shown by importing data containing an "extra" property, performing a search for records with this set to 1 (demonstrating that the database handles it correctly), and then printing the value of "extra". To reproduce: > echo '{ otherobj : { "$ref" : "othertable", "$id" : "notimportant", extra : 1 } }' > test.json ).extra)" The last line should return "1", it currently returns "null". |
| Comments |
| Comment by auto [ 17/Feb/10 ] |
|
Author: {'login': 'astaple', 'name': 'Aaron', 'email': 'aaron@10gen.com'}Message: |
| Comment by auto [ 17/Feb/10 ] |
|
Author: {'login': 'astaple', 'name': 'Aaron', 'email': 'aaron@10gen.com'}Message: |
| Comment by auto [ 17/Feb/10 ] |
|
Author: {'login': 'astaple', 'name': 'Aaron', 'email': 'aaron@10gen.com'}Message: |