@@ -1161,9 +1161,9 @@ inline fun <reified T, V> RepositoryLookup.countBy(
11611161 * @return the count of matching entities.
11621162 */
11631163@Suppress(" UNCHECKED_CAST" )
1164- inline fun <reified T , V > RepositoryLookup.count (
1165- noinline predicate : WhereBuilder <T , * , * >.() -> PredicateBuilder <T , * , * >
1166- ): Long where T : Record , T : Entity<*> = when {
1164+ inline fun <reified T > RepositoryLookup.count (
1165+ noinline predicate : WhereBuilder <T , * , * >.() -> PredicateBuilder <T , T , * >
1166+ ): Long where T : Record = when {
11671167 Entity ::class .java.isAssignableFrom(T ::class .java) -> {
11681168 val method = this ::class .java.getMethod(" entity" , Class ::class .java)
11691169 (method.invoke(this , T ::class .java) as EntityRepository <T , * >).selectCount().where(predicate).singleResult
@@ -1182,7 +1182,7 @@ inline fun <reified T, V> RepositoryLookup.count(
11821182 * @return the count of matching entities.
11831183 */
11841184@Suppress(" UNCHECKED_CAST" )
1185- inline fun <reified T , V > RepositoryLookup.count (predicateBuilder : KPredicateBuilder <T , * , * >): Long
1185+ inline fun <reified T > RepositoryLookup.count (predicateBuilder : KPredicateBuilder <T , T , * >): Long
11861186 where T : Record = when {
11871187 Entity ::class .java.isAssignableFrom(T ::class .java) -> {
11881188 val method = this ::class .java.getMethod(" entity" , Class ::class .java)
0 commit comments