dbref command in mongodb
问题 I am newbie to mongodb. I need to do a query by reference two collections using dbref and need to query particular fields. comments collection { uid:12345, pid:444, comment="blah" }, { uid:12345, pid:888, comment="asdf" }, { uid:99999, pid:444, comment="qwer" } users collection { uid:12345, name:"john" }, { uid:99999, name:"mia" } May I know the command how to insert these collections in mongodb by adding reference between two collections usind dbref? comments in uid must refer the users uid.