Is there any way to return the count of affected nodes after doing the update operation with Spring Data Neo4j repository?
e.g
@Query("MATCH (n:Student) WHERE n.id IN $idList SET n.isRegistered = true")
Integer updateRegisterInfo(@Param("idList") List<String> idList);
But sdn can only return void/null value for such operation.
Thanks
If you want the count of nodes to which the
SETwas applied, return the count of rows:If you want the count of nodes whose value of
isRegisteredwas changed, remove nodes that already haveisRegistered = truewith theWHEREclause:(I've just formatted as stand-alone Cypher to make it easier read.)