DATAMONGO-2208 - Deprecate Kotlin extensions providing a KClass overload.
We promote the usage of reified Kotlin API usage (myMethod<Person>() instead of myMethod(Person::class)) to facilitate a single and more idiomatic approach to Kotlin API usage.
Extension methods accepting KClass are deprecated now.
Original Pull Request: #648
pull/653/head
Mark Paluch7 years agocommitted byChristoph Strobl
@ -328,6 +337,7 @@ inline fun <reified T : Any> MongoOperations.findById(id: Any, collectionName: S
@@ -328,6 +337,7 @@ inline fun <reified T : Any> MongoOperations.findById(id: Any, collectionName: S
*@authorChristophStrobl
*@since2.1
*/
@Deprecated("Since 2.2, use the reified variant",replaceWith=ReplaceWith("findDistinct<T, E>(field)"))
@ -346,6 +357,7 @@ inline fun <reified T : Any> MongoOperations.findDistinct(query: Query, field: S
@@ -346,6 +357,7 @@ inline fun <reified T : Any> MongoOperations.findDistinct(query: Query, field: S
*@authorChristophStrobl
*@since2.1
*/
@Deprecated("Since 2.2, use the reified variant",replaceWith=ReplaceWith("findDistinct<T, E>(query, field, collectionName)"))
@ -458,6 +483,7 @@ inline fun <reified T : Any> MongoOperations.updateFirst(query: Query, update: U
@@ -458,6 +483,7 @@ inline fun <reified T : Any> MongoOperations.updateFirst(query: Query, update: U
*@authorSebastienDeleuze
*@since2.0
*/
@Deprecated("Since 2.2, use the reified variant",replaceWith=ReplaceWith("updateMulti<T>(query, update, collectionName)"))
@ -479,6 +505,7 @@ inline fun <reified T : Any> MongoOperations.updateMulti(query: Query, update: U
@@ -479,6 +505,7 @@ inline fun <reified T : Any> MongoOperations.updateMulti(query: Query, update: U
*@authorSebastienDeleuze
*@since2.0
*/
@Deprecated("Since 2.2, use the reified variant",replaceWith=ReplaceWith("remove<T>(query, collectionName)"))
@ -316,6 +338,7 @@ inline fun <reified T : Any> ReactiveMongoOperations.updateFirst(query: Query, u
@@ -316,6 +338,7 @@ inline fun <reified T : Any> ReactiveMongoOperations.updateFirst(query: Query, u
*@authorSebastienDeleuze
*@since2.0
*/
@Deprecated("Since 2.2, use the reified variant",replaceWith=ReplaceWith("updateMulti<T>(query, update, collectionName)"))
@ -337,6 +360,7 @@ inline fun <reified T : Any> ReactiveMongoOperations.updateMulti(query: Query, u
@@ -337,6 +360,7 @@ inline fun <reified T : Any> ReactiveMongoOperations.updateMulti(query: Query, u
*@authorSebastienDeleuze
*@since2.0
*/
@Deprecated("Since 2.2, use the reified variant",replaceWith=ReplaceWith("remove<T>(query, collectionName)"))