I am thinking about giving SDN a go again, trying out Interface-based Projections:
interface UserSDNRepository : ReactiveNeo4jRepository<UserSDN, Long> {
fun findAllUsernames(): Flux<UsernameOnly>
}
interface UsernameOnly {
val username: String?
}
and also tried a Java interface like
public interface UsernameOnly{
String getUsername();
}
but as soon as Spring Boot starts up I get:
...
Caused by: org.springframework.data.mapping.PropertyReferenceException:
No property 'findAllUsernames' found for type 'UserSDN'!
...
I have tried different names for the findAll function.
BTW I also have a fun findByUsername(username: String): Mono<SimpleUser>
where SimpleUser is a class based projection and that works fine.
What am I missing here? I think according to the docs at Spring Data Neo4j that should work. Is it not possible with Reactive repositories? Or is it a Kotlin issue?
Cheers, Chris