0

各位大佬有个问题请教一下,比如我有四个表:

patriarch:{“_id”:”p001″,”name”:”家长001″}、

student:{“_id”:”s001″,”name”:”jack”,”class_id”:”c001″,”patriarch_id”:”p001″}、

class:{“_id”:”c001″,”name”:”年级001″,”teacher_id”:”t001″}、

teacher:{“_id”:”t001″,”name”:”老师001″}

问题:

现在需要用mongodb语句查出{“p_name”:”家长001″,”s_name”:”jack”,”c_name”:”年级001″,”t_name”:”老师001″}

该怎么写嘞?

Changed status to publish