-
Notifications
You must be signed in to change notification settings - Fork 691
Closed
Labels
in: kotlinKotlin supportKotlin supportstatus: ideal-for-contributionAn issue that a contributor can help us withAn issue that a contributor can help us withtype: enhancementA general enhancementA general enhancement
Milestone

Description
The KPropertyPath
currently doesn't support references from Iterables
such as List
, Set
, etc. to the type of the element.
data class User(
val name: String,
val addresses: List<Address>
) {
data class Address(
val street: String
)
}
val path = User::addresses / User.Address::street // a type mismatch between the expected the `Address` and offered `List<Address>` occurs here
The implementation in org.springframework.data.mapping.KPropertyPath
should be able to construct paths such as addresses.street
for the usage in indexes, queries and aggregations to leverage the type-safety of Kotlin for paths references in Spring Data MongoDB.
A similar implementation is offered by the now deprecated project KMongo, see KPropertyPath.kt and Properties.kt.
Metadata
Metadata
Assignees
Labels
in: kotlinKotlin supportKotlin supportstatus: ideal-for-contributionAn issue that a contributor can help us withAn issue that a contributor can help us withtype: enhancementA general enhancementA general enhancement