From 6949e4ad70b127c98fafb853e079474bbbf7cf26 Mon Sep 17 00:00:00 2001 From: Christoph Strobl Date: Wed, 12 Oct 2022 11:50:19 +0200 Subject: [PATCH] Update javadoc. See: #4184 See: #4197 Original pull request: #4203. --- .../springframework/data/mongodb/core/MongoOperations.java | 7 ++++--- .../data/mongodb/core/ReactiveMongoOperations.java | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/MongoOperations.java b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/MongoOperations.java index 04aa510699..b77eed317a 100644 --- a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/MongoOperations.java +++ b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/MongoOperations.java @@ -1303,9 +1303,10 @@ default long exactCount(Query query, String collectionName) { /** * Insert the object into the collection for the entity type of the object to save.
* The object is converted to the MongoDB native representation using an instance of {@see MongoConverter}.
- * If your object has an "Id' property, it will be set with the generated Id from MongoDB. If your Id property is a - * String then MongoDB ObjectId will be used to populate that string. Otherwise, the conversion from ObjectId to your - * property type will be handled by Spring's BeanWrapper class that leverages Type Conversion API. See + * If your object has an {@literal Id} property which holds a {@literal null} value, it will be set with the generated + * Id from MongoDB. If your Id property is a String then MongoDB ObjectId will be used to populate that string. + * Otherwise, the conversion from ObjectId to your property type will be handled by Spring's BeanWrapper class that + * leverages Type Conversion API. See * Spring's * Type Conversion" for more details.
* Insert is used to initially store the object into the database. To update an existing object use the save method. diff --git a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/ReactiveMongoOperations.java b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/ReactiveMongoOperations.java index f031a9fa50..1efdef09d9 100644 --- a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/ReactiveMongoOperations.java +++ b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/ReactiveMongoOperations.java @@ -1110,9 +1110,10 @@ default Mono exactCount(Query query, String collectionName) { *
* The object is converted to the MongoDB native representation using an instance of {@see MongoConverter}. *
- * If your object has an "Id' property, it will be set with the generated Id from MongoDB. If your Id property is a - * String then MongoDB ObjectId will be used to populate that string. Otherwise, the conversion from ObjectId to your - * property type will be handled by Spring's BeanWrapper class that leverages Type Conversion API. See + * If your object has an {@literal Id} property which holds a {@literal null} value, it will be set with the generated + * Id from MongoDB. If your Id property is a String then MongoDB ObjectId will be used to populate that string. + * Otherwise, the conversion from ObjectId to your property type will be handled by Spring's BeanWrapper class that + * leverages Type Conversion API. See * Spring's * Type Conversion" for more details. *