Closed
Description
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:
- DATAMONGO-2138 Type-safe Kotlin query extension
("depends on")
1 votes, 4 watchers
Metadata
Metadata
Assignees
Type
Projects
Relationships
Development
No branches or pull requests
Activity
inakov commentedon 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.
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 commentedon Jul 30, 2024
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
Add Kotlin extension for type-safe Update API.