You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just tried to convert one of my CrudRepositorys to CoroutineCrudRepository.
During boot, my application throws the following error:
Caused by: org.springframework.data.mapping.PropertyReferenceException: No property 'count' found for type 'WorkerState'!
at org.springframework.data.mapping.PropertyPath.<init>(PropertyPath.java:90)
at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:437)
at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:413)
at org.springframework.data.mapping.PropertyPath.lambda$from$0(PropertyPath.java:366)
at java.base/java.util.concurrent.ConcurrentMap.computeIfAbsent(ConcurrentMap.java:330)
at org.springframework.data.mapping.PropertyPath.from(PropertyPath.java:348)
at org.springframework.data.mapping.PropertyPath.from(PropertyPath.java:331)
at org.springframework.data.repository.query.parser.Part.<init>(Part.java:81)
at org.springframework.data.repository.query.parser.PartTree$OrPart.lambda$new$0(PartTree.java:249)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
at org.springframework.data.repository.query.parser.PartTree$OrPart.<init>(PartTree.java:250)
at org.springframework.data.repository.query.parser.PartTree$Predicate.lambda$new$0(PartTree.java:383)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
at org.springframework.data.repository.query.parser.PartTree$Predicate.<init>(PartTree.java:384)
at org.springframework.data.repository.query.parser.PartTree.<init>(PartTree.java:92)
at org.springframework.data.jpa.repository.query.PartTreeJpaQuery.<init>(PartTreeJpaQuery.java:89)
... 55 common frames omitted
Neither my entity nor my repository ever mentions the term "count", except from a property named crashCount.
So, I do not try to override count() or anything like that.
Converting back to plain CrudRepository solves the problem.
I am using org.springframework.boot:spring-boot-starter-data-jpa Version 2.6.4 and PostgressDB.
The text was updated successfully, but these errors were encountered:
alkismavridis
changed the title
CoroutineCrudRepository issue with count method
CoroutineCrudRepository throws PropertyReferenceException for count method
Nov 1, 2022
I just tried to convert one of my
CrudRepository
s toCoroutineCrudRepository
.During boot, my application throws the following error:
Neither my entity nor my repository ever mentions the term "count", except from a property named
crashCount
.So, I do not try to override
count()
or anything like that.Converting back to plain
CrudRepository
solves the problem.I am using
org.springframework.boot:spring-boot-starter-data-jpa
Version2.6.4
and PostgressDB.The text was updated successfully, but these errors were encountered: