Probably better to wait for Cypher to support the feature natively I guess. I've created this issue <https://github.com/neo4j/neo4j/issues/2000> to track it.
On Saturday, 8 February 2014 15:41:30 UTC+13, Michael Hunger wrote: > > Great, thanks for the feedback Mike, > > the problem is that Cypher itself doesn't allow parameters for labels. > > You probably also have to put in backticks, just to be sure wrt quoting. > > We can add a CypherRepository interface that acts like the CypherDSL > interface to the default GraphRepository which would allow the generic > signature repo.query(query, params) Would that help you/make sense? > > Of course we could do string substitution (like we did initially before > there were parameters) but that feels like too much magic. And also is not > like the product behaves. > > What do you think? > > Michael > > Am 08.02.2014 um 03:25 schrieb Mike Holdsworth <[email protected]<javascript:> > >: > > I've been using the snapshot build for 3 weeks now and it's very solid. > Nearly time for a new RC? Label's work well. I do have a suggestion though > - can they be set dynamically similar to parameters? > > In my usecase I want to be able to retreive certain nodes from a specific > index and give the caller the flexibility of creating a node into a user > defined index. Here, I have nodes that I want to be able to assign to a > default "Tag" index and optionally to a secondary index. > > String query = "merge (tag:Tag" + tagSuffix + " {code:{code}, > name:{name}, key:{key}}) return tag"; > > In this case, tagSuffix could be "", "SomeUniqueValue" or " :OtherIndex > :AndAnother". > > As you can see I'm having to concatenate a string to achieve this. I've > had to forego using a @NodeRepository for this scenario for obvious reasons. > > Am I missing something or is this a feature request? > > -- > You received this message because you are subscribed to the Google Groups > "Neo4j" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] <javascript:>. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- You received this message because you are subscribed to the Google Groups "Neo4j" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
