Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
03-04-2022 12:50 AM
How do you handle the UNION query for Pagination in Spring Boot and Neo4j? I'm getting the following error:
Result not of expected size. Expected 1 row but found 2] with root cause
java.lang.RuntimeException: Result not of expected size. Expected 1 row but found 2
The query is ->
</>
@Query("""MATCH (n:NodeA )-[]->(r:NodeB) RETURN r UNION ALL MATCH (r:NodeB) RETURN r""",
countQuery = """MATCH (n:NodeA)-[]->(r:NodeB) RETURN COUNT(r)UNION ALL MATCH (r:NodeB) RETURN COUNT(r)""")
fun findNodeB(pageable: Pageable): Page
</>
Configurations
All the sessions of the conference are now available online