mongodb aggregate.lookup()多表查询问题?
mysql:
select pb.name
from person_base pb
left join person p on p.person_base_id = pb.id
left join institution ins on ins.id = p.institution_id
mongodb:
List list = Arrays.asList(
Aggregates.lookup("v1_block_5b179726ff2da217e05bf7bc","data_id","data_person_base_id","p"), Aggregates.project(Projections.fields(Projections.include("data_name"),Projections.excludeId()))
)
AggregateIterable<Document> mongoCollectionList = mongoDbStore.aggregate("v1_block_5b179837ff2da217e05bf7be",list);
我怎么把上面的sql语句转成正确的mongodb语句,我只能关联一张表,不能关联第二章机构表