How to check that the List<Object> exists and contains an object of class whose partnerRole field value is equal to “CREATOR” and companyId field value is equals to “123”? Document class: My method for generating a List of Criteria. But that won’t work because I’m referring to partners as if it were a PartnerDocument object, but partners is actually a
Tag: spring-data-mongodb
How to custom sort only specific results in Spring MongoDB?
Is it possible to sort only results that matches a condition in Spring Mongo? Let us say I have this data: Color Fruit Amount Orange Orange 23 Red Apple 4 Red Strawberry 66 Yellow Banana 2 I …
How to count array elements properly with multiple aggregation in Spring Data MongoDB?
I need to create advanced aggregation using Spring Data MongoDB having model like that: @Getter @Setter @Document public class City { @Id @JsonSerialize(using = ToStringSerializer.class) …
How to get list of data containing count of a field using Aggregation and Criteria in Spring Boot with MangoDB
Requirement: documents-bookdata collection may have multiple objects with same bookPublisherName but different bookName. Means multiple books can have same publisher so need to extract count of books …
Spring Data MongoDB 4.0 transactions support
MongoDB 4.0 are going to introduce transactions support with ACID guarantees. Does Spring Data MongoDB already supports the transactions in MongoDB and if no, when this awesome feature will be available. I really need it, taking into account the following issue – MongoDB schema design in order to support application horizontal scaling Answer Does Spring Data MongoDB already supports the