MongoDB Advanced Aggregate Query Usage Guide
MongoDB version is: 2.0.8 The system is: 64-bit Ubuntu 12.04 First show him my table structure [Oh sorry, Mongo is called a collection] As you can see, I try to simulate real life scenarios as much as possible. This is a Person entity, he has basic manId, manName, There are friends [myFriends], there are favorite fruits [fruits], and each fruit has a favorite weight. Unfortunately, you also saw a “_class” field? Because I am a Java developer, I also like to use Spring, so I chose Spring Data Mongo’s class library [it can be regarded as a framework, but I don’t think so]. Now many people are tired of seeing Spring and are starting to get bored. Yes, Spring has great ambitions, and he almost wants to monopolize everything in Java. There is no way I can’t do without him since I used Spring, so that I basically don’t need to learn other frameworks. I have learned a lot about Spring, such as: Spring Security/Spring Integration/Spring Batch and so on. . . He who didn’t invent the wheel has already provided many scenarios in programming. I used those scenarios to solve many problems in my work and made my work…