Previously with SDN 3.x I have used following query:
@Query(value = "START d=node:node_auto_index({autoIndexQuery}) MATCH (d:Decision) RETURN d")
Page<Decision> searchDecisions(@Param("autoIndexQuery") String autoIndexQuery, Pageable page);
Right now I'd like to port this functionality to new SDN 4.2.0 snapshot but it fails with a following exception:
org.springframework.core.convert.ConversionFailedException: Failed to convert from type [java.util.ArrayList<?>] to type [org.springframework.data.domain.Page<?>] for value '[BaseEntity [id=3259, createDate=Mon Jul 11 11:51:10 EEST 2016, updateDate=null], BaseEntity [id=3351, createDate=Mon Jul 11 11:51:10 EEST 2016, updateDate=null], BaseEntity [id=3328, createDate=Mon Jul 11 11:51:10 EEST 2016, updateDate=null], BaseEntity [id=3252, createDate=Mon Jul 11 11:51:10 EEST 2016, updateDate=null]]'; nested exception is org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [java.util.ArrayList<?>] to type [org.springframework.data.domain.Page<?>]
at org.springframework.core.convert.support.ConversionUtils.invokeConverter(ConversionUtils.java:42)
at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:192)
... more
How to correctly port this query and use pagination support introduced in SDN 4.2.0 ?