Announcement Announcement Module
Collapse
No announcement yet.
Neo4j cypher "..return ID(n)" result type differ in embedded and standalone database Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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

    Comment


    • #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).

      Comment

      Working...
      X