Skip to content

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

Closed
@spring-projects-issues

Description

@spring-projects-issues

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

Activity

inakov

inakov commented on Dec 21, 2021

@inakov

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.

added 2 commits that reference this issue on Jul 29, 2024

spring-projects#3028 - Add support for type-safe kotlin DSL for Updat…

spring-projects#3028 - Add support for type-safe kotlin DSL for Updat…

pmatysek

pmatysek commented on Jul 30, 2024

@pmatysek
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

added a commit that references this issue on Sep 13, 2024
df08576
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @mp911de@christophstrobl@inakov@spring-projects-issues@pmatysek

      Issue actions

        Type-safe Kotlin update extension [DATAMONGO-2163] · Issue #3028 · spring-projects/spring-data-mongodb