多级联接

时间:2018-09-05 15:02:17

标签: join mongoose

在sql中,我有这样的查询

    select * from table1, table2, table3, table4 where table2.field2=value1 and table2.field2=table1.field2
    and table1.value1=value3 and table2.field3=table3.field1 and table4.field1=table3.field2
    e.g.
    select * from city, state, county, country where state.name='xxy' and state.id=city.state_id
    and city.name!='yyy' and state.country_id=country.id and county.city_id=city.id

如何将其转换为猫鼬。我已经进行了2次连接,但是我很困惑如何进行4次连接

0 个答案:

没有答案