Results 1 to 3 of 3

Thread: Neo4j cypher "..return ID(n)" result type differ in embedded and standalone database

  1. #1
    Join Date
    Feb 2012
    Posts
    9

    Default 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)

  2. #2
    Join Date
    May 2012
    Posts
    107

    Default

    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

  3. #3
    Join Date
    Jan 2011
    Location
    Dresden, Germany
    Posts
    525

    Default

    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
  •