Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BulkOperations#updateMulti Improvement: Allow Kotlin's Pair Instead of Forcing Spring's Pair #4911

Open
2tsumo-hitori opened this issue Mar 2, 2025 · 1 comment · May be fixed by #4912
Open
Assignees
Labels
status: ideal-for-contribution An issue that a contributor can help us with type: enhancement A general enhancement

Comments

@2tsumo-hitori
Copy link

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.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Mar 2, 2025
@mp911de mp911de added status: ideal-for-contribution An issue that a contributor can help us with type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Mar 3, 2025
@mp911de
Copy link
Member

mp911de commented Mar 3, 2025

Good idea. We'd appreciate a pull request introducing a Kotlin extension using Kotlin pairs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: ideal-for-contribution An issue that a contributor can help us with type: enhancement A general enhancement
Projects
None yet
4 participants