Spring Data Neo4J 4.0.0 : What is the right sequence of calls to lookup by property? -


i doing simple camel case lookup on node in neo4j 4.0.0.m1:

e.g.

userrepository.findbyuserid(string userid);   

i can see in log file correct cypher query generated:

match (u:user) u.userid = {0} return u 

and can run code in neo4j browser expected result of 1 node being returned. can see correct json getting generated

e.g.

21:53:39.819 [tomcat-http--37] info  o.n.o.session.request.defaultrequest - post http://localhost:7474/db/data/transaction/commit, request: {"statements":[{"statement":"match (u:user) u.userid = {0} return u","parameters":{"0":"145"},"resultdatacontents":["graph"]}]} 

and can run postmaster , expected result of 1 node being returned.

however, running through code named query in graphrepository returns every node currently, believe, in neo4jsession.

here userrepository:

@repository public interface usernoderepository extends graphrepository<user> {      @query ("match (u:user) u.userid = {0} return u")     public list<user> findbyuserid(string userid);  } 

running code returns ever user have ever created in neo4j.

note have changed return type list because expected behavior of 1 node being returned not happening , getting mapping exception. note there named query here because wasn't sure if problem might camel case lookup vs. named query.

this working correctly in neo4j 3.3.x

also, have traced problem neo4jsession.query() call being made neo4jsession.query in turn following:

return getresponsehandler().loadall(type, response); 

this returning nodes in mappingcontext given class type. should, believe, calling neo4jsession.loadbyproperty lookup on node.

is there setting missing?

@query returning undesired results has been fixed post m1 release. use snapshot build try again?

http://repo.spring.io/libs-snapshot/org/springframework/data/spring-data-neo4j/4.0.0.build-snapshot/


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -