-
Aug 9th, 2012, 03:34 AM
#1
Neo4j cypher "..return ID(n)" result type differ in embedded and standalone database
Hi,
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?
Thanks
Vlado K
Environment:
SDN 2.1.0.RC2
Neo4j 1.7.2 (neo4j-rest-graphdb 1.7 by maven dependencies)
-
Aug 10th, 2012, 02:48 AM
#2
Vlado,
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?
Lasse
-
Aug 10th, 2012, 03:53 AM
#3
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules