I have the following query which works fine:
@Query( "....(d)-[rdpr:CONTAINS*]->(pr) " + "RETURN count(rdpr) > 0 as c") boolean hasPermission(...);
now I'd like to extend the return statement with something like this:
@Query("....MATCH (d)-[rdpr:CONTAINS*]->(pr) " + "RETURN CASE be.secured WHEN false THEN true ELSE (count(rdpr) > 0) END as allowed") boolean hasPermission(...);
but it fails with the following error:
org.springframework.aop.AopInvocationException: Null return value from advice does not match primitive return type for: public abstract boolean com.example.domain.repository.neo4j.system.security.permission.PermissionRepository.hasPermission(..)
What am I doing wrong and how to fix it?