Skip to content

Add Kotlin extension to accept Kotlin's Pair in BulkOperations #4911

Closed
@2tsumo-hitori

Description

@2tsumo-hitori

Related: #2313, f318185

Hello,

When using spring-data-mongodb with Kotlin, I encountered an inconvenience where the updateMulti API of the BulkOperations interface—as well as several other APIs—forces the use of Spring Framework’s utility Pair class. Consequently, Kotlin’s native Pair cannot be used directly, and developers are required to import or convert to Spring’s Pair, which is cumbersome.

To address this issue, I propose adding extension functions in the Kotlin module. These extension functions would accept Kotlin’s Pair as an argument, convert it internally to Spring’s Pair, and then delegate to the existing API.

I would appreciate any feedback on this proposal.

Thank you.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions