Good evening everyone,
I’m new to MongoDb, I tried to export an aggregation from compass to the java language.
Arrays.asList(new Document("$lookup",
new Document("from", "indirizzi")
.append("localField", "indirizzi")
.append("foreignField", "_id")
.append("as", "indirizzi")),
new Document("$match",
new Document("name", "Diego")))
I couldn’t find an example where to apply this code in Spring Boot using dependency:
<dependency>
<groupId> org.springframework.boot </groupId>
<artifactId> spring-boot-starter-data-mongodb </artifactId>
</dependency>
Can you kindly tell me how can I do? or a guide where I can find a complete example?
thank you