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

Type-safe Kotlin update extension [DATAMONGO-2163] #3028

Closed
spring-projects-issues opened this issue Dec 10, 2018 · 2 comments
Closed

Type-safe Kotlin update extension [DATAMONGO-2163] #3028

spring-projects-issues opened this issue Dec 10, 2018 · 2 comments
Assignees
Labels
in: core Issues in core support type: enhancement A general enhancement

Comments

@spring-projects-issues
Copy link

Mark Paluch opened DATAMONGO-2163 and commented

Similar to DATAMONGO-2138, we should provide a type-safe Update DSL using Kotlin property references. The initial pull request contained already a potential example:

operations.updateFirst(Book::name isEqualTo "Moby-Dick", set(Book::price, 11)) 

Reference URL: #622

Issue Links:

1 votes, 4 watchers

@spring-projects-issues spring-projects-issues added type: enhancement A general enhancement in: core Issues in core support labels Dec 30, 2020
@inakov
Copy link

inakov commented Dec 21, 2021

Hey there, is someone working on this? With your help, I can try to prepare a PR for this, because I really hate mixing both typed queries and Update builders.

pmatysek added a commit to pmatysek/spring-data-mongodb that referenced this issue Jul 29, 2024
pmatysek added a commit to pmatysek/spring-data-mongodb that referenced this issue Jul 29, 2024
@pmatysek
Copy link
Contributor

Hi,
I've prepared a PR with the proposal for this type-safe Update DSL. For every method in the Update class, I created an extension equivalent in Kotlin taking KProperty as a key

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core support type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

5 participants