[SERVER-28896] $lookup should work right with array dot notation in localField Created: 21/Apr/17  Updated: 21/Apr/17  Resolved: 21/Apr/17

Status: Closed
Project: Core Server
Component/s: Aggregation Framework
Affects Version/s: 3.4.3
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Jame Yang Assignee: David Storch
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-28717 $lookup does not expand 'localField' ... Closed
Operating System: ALL
Steps To Reproduce:

db.test.drop()
 
db.test.insert({ "_id" : 1, "aa" : [ "bb" : { "id" : "1611e293-61c4-4028-b6fd-c5909247b020", "type": "form_charger" } ] })
 
db.form_charger.insert({ "_id" : 1, "id" : "1611e293-61c4-4028-b6fd-c5909247b020" })
 
db.test.aggregate([{ '$lookup': { from: 'form_charger', localField: 'aa.0.bb.id', foreignField: 'id', as: 'data_bb' } }])

The result of *data_bb* always empty.

Participants:

 Description   

The $lookup stages now not work with dot notation when the path point into an embedded array.



 Comments   
Comment by David Storch [ 21/Apr/17 ]

Hi futurist,

Thanks for reporting this issue. I believe this is a duplicate of SERVER-28717, which is currently scheduled to be fixed in an upcoming 3.5.x development release. Once the fix is in, we will evaluate the possibility of backporting to the 3.4 or 3.2 branches. Please watch SERVER-28717 for further updates. Let me know if you have any questions or concerns.

Best,
Dave

Generated at Thu Feb 08 04:19:22 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.