Skip to content

Commit c22d131

Browse files
committed
DATAMONGO-2138 - Make nestedFieldName() internal
1 parent c394986 commit c22d131

File tree

1 file changed

+4
-5
lines changed
  • spring-data-mongodb/src/main/kotlin/org/springframework/data/mongodb/core/query

1 file changed

+4
-5
lines changed

spring-data-mongodb/src/main/kotlin/org/springframework/data/mongodb/core/query/NestedProperty.kt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,15 @@ import kotlin.reflect.KProperty1
2525
* @since 2.2
2626
*/
2727
class NestedProperty<T, U>(
28-
internal val parent: KProperty<T>,
29-
internal val child: KProperty1<T, U>
30-
) : KProperty<U> by child
28+
internal val parent: KProperty<U>,
29+
internal val child: KProperty1<U, T>
30+
) : KProperty<T> by child
3131

3232
/**
3333
* Recursively construct field name for a nested property.
3434
* @author Tjeu Kayim
35-
* @since 2.2
3635
*/
37-
fun nestedFieldName(property: KProperty<*>): String {
36+
internal fun nestedFieldName(property: KProperty<*>): String {
3837
return when (property) {
3938
is NestedProperty<*, *> ->
4039
"${nestedFieldName(property.parent)}.${property.child.name}"

0 commit comments

Comments
 (0)