java - Query-parameter substitution fails -


i have repository following one, i'm using annotated query parameters. when comes substitution, fails exception: org.neo4j.cypher.parameternotfoundexception: expected parameter named custtype1

public class custtypes {     public static final string type1 = "foo";     public static final string type2 = "bar"; }   public interface customqueryrepository extends graphrepository<customentity> {     @query(         value =              " start c=node({0}) "           + " c.type! = {custtype1} "           + "    or c.type! = {custtype2} "           + "return distinct c, c.type comptype",         params = {             "custtype1", custtypes.type1,             "custtype2", custtypes.type2     })     iterable<custommapresult> gettypes(list<long> nodeids); } 

i tried using named parameter (with @param) nodeids made no difference.

what missing here, or can't mix query.params method parameters?

i'm using spring-data-neo4j version 2.3.0.m1

thanks, in advance

from read in reference documentation, seems param attribute of @query used when fields of entities annotated @query.

edit: found issues documents behaviour. still think should mentioned somewehere in sdn documentation: https://jira.springsource.org/browse/datagraph-163

tldr: param attribute doesnt work in repositories(yet)


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -