neo4j - @Query result type different between ImpermanentGraphDatabase and SpringCypherRestGraphDatabase? -
i using @query annotation on repository interface method retrieve list of nodes contained in path.
if switch impermanentgraphdatabase springcypherrestgraphdatabase, having errors while parsing results because type returned query different :
context :
- using sdn 3.3.0.release , neo4j 2.1.7
- code used in junit test
- my graph :
(t:type1)-[:has_key]->(:key)-[:next]->(:key)-[:next]->(:key)-[:next]->
.... , on (yeah, sounds linkedlist ^^) the query "i want keys associated type" used path query :
match (key:key)<-[:has_key]-(:type1 {typeid :{0}}), p=(key)-[:next*]->(:key) return nodes(p) order length(p) desc limit 1
using impermanentgraphdatabase :
- my query returns
iterable<iterable<object>>
, have cast "object" inside nodeentity usingneo4joperations.convert(...)
method because objects of typenodeproxy
.
using springcypherrestgraphdatabase :
- my query returns
iterable<iterable<map<string, string>>>
, , map contains property name of node key , corresponding value map entry value.
why there such implementation difference ? shouldn't expect same behaviour regardless of database service implementation ?
thank you.
p.s. : way, tried achieve same goal using traversaldescription: works , same traversaldescription works on both database implementations
Comments
Post a Comment