diff --git a/spring-data-mongodb/src/main/kotlin/org/springframework/data/mongodb/core/query/TypedCriteriaExtensions.kt b/spring-data-mongodb/src/main/kotlin/org/springframework/data/mongodb/core/query/TypedCriteriaExtensions.kt index 9f7583047..08a30c81b 100644 --- a/spring-data-mongodb/src/main/kotlin/org/springframework/data/mongodb/core/query/TypedCriteriaExtensions.kt +++ b/spring-data-mongodb/src/main/kotlin/org/springframework/data/mongodb/core/query/TypedCriteriaExtensions.kt @@ -53,8 +53,8 @@ infix fun KProperty.ne(value: T): Criteria = * @since 2.2 * @see Criteria.lt */ -infix fun KProperty.lt(value: T): Criteria = - Criteria(this.toDotPath()).lt(value) +infix fun KProperty.lt(value: Any): Criteria = + Criteria(this.toDotPath()).lt(value) /** * Creates a criterion using the $lte operator. @@ -64,8 +64,8 @@ infix fun KProperty.lt(value: T): Criteria = * @since 2.2 * @see Criteria.lte */ -infix fun KProperty.lte(value: T): Criteria = - Criteria(this.toDotPath()).lte(value) +infix fun KProperty.lte(value: Any): Criteria = + Criteria(this.toDotPath()).lte(value) /** * Creates a criterion using the $gt operator. @@ -75,8 +75,8 @@ infix fun KProperty.lte(value: T): Criteria = * @since 2.2 * @see Criteria.gt */ -infix fun KProperty.gt(value: T): Criteria = - Criteria(this.toDotPath()).gt(value) +infix fun KProperty.gt(value: Any): Criteria = + Criteria(this.toDotPath()).gt(value) /** * Creates a criterion using the $gte operator. @@ -86,8 +86,8 @@ infix fun KProperty.gt(value: T): Criteria = * @since 2.2 * @see Criteria.gte */ -infix fun KProperty.gte(value: T): Criteria = - Criteria(this.toDotPath()).gte(value) +infix fun KProperty.gte(value: Any): Criteria = + Criteria(this.toDotPath()).gte(value) /** * Creates a criterion using the $in operator.