{"SyntaxException: Invalid input '{': expected an identifier character, whitespace
<p>VB.NET program that loads a few thousand nodes and set up relationships between them. I'm using the Neo4J C# Client (version 1.1.0.8)</p>

<p>One of the commands is </p>

<pre><code>TheConnection.GraphClient.Cypher.Match(
    "(user1:StartingPoint)",
    "(user2:Committee)"
).Where(
    Function(user1 As StartingPoint)
        user1.Id = KnowsID
).AndWhere(
    Function(user2 As Committee)
        user2.Id = KnownID
).Create(
    "user1-[r: Knows ]-&gt;user2"
).ExecuteWithoutResults()
</code></pre>

<p>For various business logic reasons I want to match the nodes by FECIDNumber (it's actually a string, in example 'C00530767') instead of ID. So I changed </p>

<ol>
<li>KnownID from Long to String</li>
<li>user2.Id = KnownID</li>
</ol>

<p>This gives me following query</p>

<pre><code>TheConnection.GraphClient.Cypher.Match(
    "(user1:StartingPoint)",
    "(user2:Committee)"
).Where(
    Function(user1 As StartingPoint)
        user1.Id = KnowsID
).AndWhere(
    Function(user2 As Committee) user2.FECIDNumber = KnownID
).Create(
    "user1-[r: Knows ]-&gt;user2"
).ExecuteWithoutResults()
</code></pre>

<p>When executed it throws </p>

<pre><code>{"SyntaxException: Invalid input '{':expected an identifier character, whitespace, '?', '!', '.', node labels, '[', ""=~"", IN, STARTS, ENDS, CONTAINS, IS, '^', '*', '/', '%', '+', '-', '=', ""&lt;&gt;"", ""!="", '&lt;', '&gt;', ""&lt;="", ""&gt;="", AND, XOR, OR or ')' (line 3, column 23 (offset: 95))" &amp; vbLf &amp; """AND (user2.FECIDNumber{p1}{p2} = {p3})" &amp; vbCr &amp; """" &amp; vbLf &amp; "                       ^"}
</code></pre>

<p>When I go into the Neo4J Browser and run</p>

<pre><code>MATCH (user:Committee) WHERE user.FECIDNumber = "C00530766" RETURN user
</code></pre>

<p>it returns the node as expected.</p>

<p>I think the important part of the error seems to be </p>

<pre><code>(line 3, column 23 (offset: 95))
  " &amp; vbLf &amp; """AND (user2.FECIDNumber{p1}{p2} = {p3})" &amp; vbCr &amp; """" &amp; vbLf &amp; " 
</code></pre>

<p>It looks like the Neo4J C# Client is tossing in a second parameter <code>{p2}</code>, but that's just a guess.</p>

<p>Any suggestions?</p>

<p><strong>Edit 1</strong></p>

<p>(I didn't know I could even pull the raw query text)</p>

<p>It's returning </p>

<pre><code>MATCH (user1:StartingPoint), (user2:Committee)
WHERE (user1.Id = 1)
AND (user2.FECIDNumber"C00530766"false = 0)
CREATE user1-[r: Knows ]-&gt;user2
</code></pre>

<p>Clearly the problem is that </p>

<pre><code>user2.FECIDNumber = KnownID).Create("user1-[r: Knows ]-&gt;user2")
</code></pre>

<p>is somehow generating </p>

<pre><code>user2.FECIDNumber"C00530766"false = 0
</code></pre>

<p>Ideas? Is there a different syntax I should be using? Do I need to convert FECIDNumber to a different type? </p>

<p><strong>Edit 2</strong></p>

<p>The same code now generates</p>

<pre><code>MATCH (user1:StartingPoint), (user2:Committee)
WHERE (user1.Id = 1)
AND (user2.FECIDNumber = "C00530766")
CREATE user1-[r: Knows ]-&gt;user2 
</code></pre>

<p>And it creates the relationship as expected.</p>

<p>Winner.....</p>