spring-data-mongodb
spring-data-mongodb copied to clipboard
Provides support to increase developer productivity in Java when using MongoDB. Uses familiar Spring concepts such as a template classes for core API usage and lightweight repository style data access...
We now make sure to provide an `id` value that matches the desired target type when no `id` is set, and the property defines an explicit conversion target. Previously a...
We now make sure to convert references in update operations targeting collection like fields when using eg. the `push` modifier. Closing: #4041
We now consider a potentially set target field type when converting the pointer. Closes: #4033
Since: MongoDB 5.0 See: https://www.mongodb.com/docs/manual/reference/operator/aggregation/getField/
**[John Mark](https://jira.spring.io/secure/ViewProfile.jspa?name=springiscool)** opened **[DATAMONGO-1383](https://jira.spring.io/browse/DATAMONGO-1383?redirect=false)** and commented The current `org.springframework.context.ApplicationEvent` support is nice, but lacks support for catching updates. For example, I have a `lastModified` field that I would like to...
ComparisonOperators.Lte seems to match undefined/null value in switch caseOperator ``` reactiveMongoTemplate.upsert(Query.query( Criteria.where("id").is(b.getId()) ), AggregationUpdate.update() .set("field.value").toValue( ConditionalOperators.switchCases( CaseOperator.when(Gte.valueOf("field_priority") .greaterThanEqualToValue(b.getField().getPriority())) .then("gte"), CaseOperator.when(Lte.valueOf("field_priority") .lessThanEqualToValue(b.getField().getPriority())) .then("lt") ) .defaultTo("default") ), Bar.class)).flatMap(c -> Mono.just(foo)); ``` if...
Currently in `Criteria` class we have the method ``` public Criteria orOperator(Criteria... criteria) { BasicDBList bsonList = createCriteriaList(criteria); return registerCriteriaChainElement(new Criteria("$or").is(bsonList)); } ``` This can be changed to ``` public...
Asserting that eg. a _property name_ must not be `empty` can be quite expensive if done frequently esp. within the mapping layer. Also remove assertions done multiple times for the...
MongoDB @Id not working for String identifier when upgrading from Spring boot 2.3 to Spring boot 2.6
Hi, My Model class has following annotaion @Document(collection="abc") class ABC{ @id private String myId; } public interface ABCRepo extends MongoRepository{ } when I call abcRepo.save(abcObject); then _id is stored blank...
I am a bit confused about the MongoTemplate WriteResultChecking variable: https://github.com/spring-projects/spring-data-mongodb/blob/1b7678a6af8c21e2584143ae215b18e50bcc6b7f/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/MongoTemplate.java#L180 does this actively suppress write errors thrown by the MongoDB driver? This is what the document says: https://docs.spring.io/spring-data/mongodb/docs/current/reference/html/#mongo.reactive.template.writeresultchecking We...