I have this: A field which is a map where the keys are UUIDs and the value another object which is not relevant. A list of UUIDs that should be passed as parameter. I want to: delete from the collection all documents where all keys of the map are included in the list of UUIDs The object: With derived queries
Tag: mongodb
Why filtering does not work with Spring Boot and MongoDB
Why filtering by import_created_at does not work? I have a Spring Boot Application and MongoDB as database. I have Mongo collection items and 2 documents there: I have entity classes for items: and and and and and And I have repository class: When I call the repo method findAllByFilters without filters (only by contractId = 1) it returns 2 documents
MongoDB : fields are excluded when invoke multiple lookup stages
Result : [![enter image description here][1]][1] Why the fields name and region in collection templatefolders are excluded ? I want to know why this behavior ? I don’t like to use unwind because i have multiple collections with multiple refrence relation. Answer Your second $lookup, is overriding the joinDashboard key completely. Since you want joinFolder to be within joinDashboard, you
ArrayStoreException while creating Morphia Datastore
I’m trying to create a MongoDB database using Morphia, however when I create the Morphia Datastore, I get the following error: I’ve researched the cause of this exception and I understood that this is an issue concerning arrays, but I’m not using any arrays. This error is happening when I’m creating the Datastore. Here is some of my code. All
NoSuchBeanDefinitionException with reactive mongo repository: required a bean of type that could not be found
I have an issue: repository bean couldn’t be found when it’s placed in outer package. It causes nested UnsatisfiedDependencyException which is due to NoSuchBeanDefinitionException (expected at least 1 bean which qualifies as autowire candidate). After I copied the class to my project, it works perfectly. But I would like to use it as a dependency on external module. This is
Auditing (@CreatedDate) does not work for WebFlux Spring Boot with reactive MongoDB
Does WebFlux Spring Boot with reactive MongoDB supports Auditing? I tried to use @CreatedDate and it did not work for me. Here is my configuration: Here is my document class Here is Message repository When I save message messageRepository.save(message) I always have createdDate=null Do I miss something or Auditing does not work with reactive MongoDB? Answer I resolved the issue
How to find a Bean instance of MongoRepository?
I am trying to use a MongoRepository, but Spring complains, that no instance of the MonoRepository-Interface is in the context. The server complains: my maven pom.xml: How can I get a bean instance of my MongoRepository? Answer The dependency is incorrect. spring-data-mongodb only makes it compile: But you need additional dependencies, to make it run. For convenience you can import
Spring MongoDB Criteria: How to check that the List exists and contains object with specific value?
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
Aggregation Annotation Not Working It is Returning Empty
I am trying to make this Aggregation bellow using Spring Java, but it’s returning an Empty List on my console. This is working on MongoDB, but not on my spring application. This is my MongoDB Query: It’s return me 2 results: My Problem is when I do this using Mongo with Spring Java: My Repository A part of My Service
Is there such a query for mongodb?
I need to do a query on mongoDB due to I am developing in Java with Spring Boot and MongoDB. I know that this command is for arrays: This query let me to find if all fields of the arraylist “skillsOfCV” are in the arraylist called “skills” However, I am trying to pass an arraylist as “skillsOfCV” to compare all