admin管理员组

文章数量:1410682

I am using Spring Data Mongo and a Mongo DB, I have to join a field below, please share best approach. I have tried aggregate approach but its giving performance issue.

Collection A
{
"name1": "abcd",
"name2": ["123":{"name3":"abc123","name4":"efg456"},"456":{"name3":"ijk789","name4":"lmn012"}]
}

Collection B
{
"name5":"abc123"
}

Collection A field name3 joins with Collection B name5 field.

Input - Collection A name2 field first element - 123 in above example

Output - Collection B data

Ideal solution seems avoiding table join and calling 2 separate SQL's to optimise the performance.

本文标签: mongodbjoin combination in springdatamongo for no name list fieldsStack Overflow