Aug 9th, 2012, 03:34 AM
Neo4j cypher "..return ID(n)" result type differ in embedded and standalone database
when I execute cypher query like this "START n=node(1) RETURN ID(n)" the result type is Long.class in case the neo4j database is embedded, but run as standalone server accessed through Rest API (org.springframework.data.neo4j.rest.SpringRestGra phDatabase) the result is Integer.class.
I think that difference occurred in conversion process in client server mode. JSON response is :
"data" : [ [ 1 ] ],
"columns" : [ "ID(n)" ]
Type information isn't preserved so parser creates Integer instance of Id.
I think it must be Long type in both situations. Am I right?
Neo4j 1.7.2 (neo4j-rest-graphdb 1.7 by maven dependencies)
Aug 10th, 2012, 02:48 AM
That looks like a problem, can you raise a ticket for it please: https://jira.springsource.org/browse/DATAGRAPH
In the mean time, is it possible for you to tunnel those value as String perhaps?
Aug 10th, 2012, 03:53 AM
This is a problem of the JSON parse, it parses the Number just as int, not much we can do there. As we don't have type information on the JSON REST result (yet).
Tags for this Thread