15
15
*/
16
16
package org.springframework.data.mongodb.core.query
17
17
18
+ import org.springframework.data.mapping.toDotPath
18
19
import kotlin.reflect.KProperty
19
20
import kotlin.reflect.KProperty1
20
21
@@ -25,7 +26,9 @@ import kotlin.reflect.KProperty1
25
26
* @author Mark Paluch
26
27
* @author Yoann de Martino
27
28
* @since 2.2
29
+ * @deprecated since 3.2, KPropertyPath from Spring Data Commons.
28
30
*/
31
+ @Deprecated(" use KPropertyPath from Spring Data Commons" , replaceWith = ReplaceWith (" KPropertyPath" , " org.springframework.data.mapping.KPropertyPath" ))
29
32
class KPropertyPath <T , U >(
30
33
internal val parent : KProperty <U ?>,
31
34
internal val child : KProperty1 <U , T >
@@ -39,7 +42,7 @@ internal fun asString(property: KProperty<*>): String {
39
42
return when (property) {
40
43
is KPropertyPath <* , * > ->
41
44
" ${asString(property.parent)} .${property.child.name} "
42
- else -> property.name
45
+ else -> property.toDotPath()
43
46
}
44
47
}
45
48
@@ -54,6 +57,8 @@ internal fun asString(property: KProperty<*>): String {
54
57
* @author Tjeu Kayim
55
58
* @author Yoann de Martino
56
59
* @since 2.2
60
+ * @deprecated since 3.2, KPropertyPath.div from Spring Data Commons.
57
61
*/
62
+ @Deprecated(" use KPropertyPath.div from Spring Data Commons" , replaceWith = ReplaceWith (" this / other" , " org.springframework.data.mapping.div" ))
58
63
operator fun <T , U > KProperty<T?>.div (other : KProperty1 <T , U >) =
59
64
KPropertyPath (this , other)
0 commit comments