[SERVER-158] make syre refs to virtual collections work Created: 14/Jul/09  Updated: 02/Aug/18  Resolved: 05/Jan/18

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

Type: Task Priority: Major - P3
Reporter: sandstrom Assignee: Unassigned
Resolution: Won't Fix Votes: 6
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

Would be great if the DB ref spec. (http://www.mongodb.org/display/DOCS/DB+Ref+Specification) supported deep referencing.

Perhaps something along the lines {$id:1, $ref:"collection", $namespace:"chairs"}

Also, preferably both support for single embedded objects in an situations where there would be an array of embedded objects. Eg. it should be possible to reference both a single chair and a single roof.

Example:
{
_id:1,
type:"house",
chairs:[ {_id:1, color:"black"}, {_id:2, color:"red"}, {_id:3, color:"blue"}]
roof: {_id:1, material:"wood"}
}



 Comments   
Comment by Eliot Horowitz (Inactive) [ 20/Jul/09 ]

will be what i commented above

{ $id : ... , $ns : "foo.$things" }
Comment by sandstrom [ 20/Jul/09 ]

Eliot: I must implement this now and it would be nice if I followed the upcoming reference specification.

Could you give a qualified guess on what it will be like? Is it simply the current spec;

{..., $ref:"ns.to.collection"}

or what you suggested above

{..., $ns:"ns.to.collection"}

? Your help would be appreciated.

Comment by Eliot Horowitz (Inactive) [ 14/Jul/09 ]
{ $id : .. , $ns : "foo.$things" }
Generated at Thu Feb 08 02:53:12 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.