Home:ALL Converter>Spring data mongodb lookup on multiple fields

Spring data mongodb lookup on multiple fields

Ask Time:2018-07-24T16:35:11         Author:5400824

Json Formatter

I am working on spring mongodb. I want to apply join between two tables/collections based on two fields or columns of tables/collections. I have already done joining collections based on one field, using lookup. But it seems that lookup don't allow joining on two fields. I also tried to use match with lookup, but match compare field with given string and don't allow to match one field with other field of collection in spring mongodb (or may be i am doing wrong).

How can i join two collections based on two fields in spring mmongodb?

Author:5400824,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/51494079/spring-data-mongodb-lookup-on-multiple-fields
yy