Good morning!
My Spring application doesn't seem to detect existsBy projections
Caused by: org.springframework.data.mapping.PropertyReferenceException: No property existsById found for type Planet!
at org.springframework.data.mapping.PropertyPath.<init>(PropertyPath.java:77)
at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:329)
at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:309)
at org.springframework.data.mapping.PropertyPath.from(PropertyPath.java:272)
Code in the repository
public boolean existsByIdAndOwnerId(Long planetId, Integer ownerId);
Thanks in advance!
Try naming the method: existsPlanetByIdAndOwnerId()
This link may help: https://www.baeldung.com/spring-data-derived-queries
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With