mongodb - c# query reference data in array -
i got array in document referencing documents different collection. below sample:
{ _id: 'someid', ... docs: [ { $ref: 'invoice', $id: 'invid1' }, { $ref: 'deliveryorder', $id: 'doid1' }, ... ] }
is there way me query return full set of document referencing to? below sample of preferred output:
{ _id: 'someid', ... docs: [ { _id: 'invid1', customer: 'somecustomerid', ... }, { _id: 'doid1', address: 'someaddress', ... } ] }
Comments
Post a Comment