With SDN 3 it was possible to use Neo4jOperations.convert(Object value, Class type) to convert results from a cypher query which returns Iterable<Map<String, Object>> to a Neo4j domain class (annotated with @NodeEntity). For example:
Map<String,Object> results = repository.findSomething("John");
for(Map<String,Object> row : results) {
Person person = neo4jOperations.convert(row.get("person"), Person.class);
...
}
// Repository method
@Query("MATCH (person:Person)-[rel]->(node) WHERE person.firstName = {firstName} RETURN DISTINCT person, COUNT(rel) ORDER BY COUNT(rel)"
Iterable<Map<String,Object>> findSomething(@Param("firstName") String firstName);
As T convert(Object value, Class type) no longer exists in Neo4jOperations in SDN 4, what's the equivalence for this in SDN 4?
http://docs.spring.io/spring-data/neo4j/docs/4.0.0.M1/reference/html/#reference_programming_model_simple-mapping doesn't cover how the mapping/conversion is done explicitly or implicitly.
I'm using the snapshots build.
Any help much appreciated.