Labels apply to nodes. You’re creating a relationship.
Relationships have a single type. This is working as expected. -- Tatham Oddie From: [email protected] [mailto:[email protected]] On Behalf Of Paolo Di Pietro Sent: Tuesday, 10 June 2014 05:00 To: [email protected] Subject: [Neo4j] Probable bug in Neo4j cypher Hi all, I'm running Neo4j 2.0.0 community edition. I'm in trouble running a query. I believe to have discovered a flaw about labels. Here are a query with 3 sligthly different sintax, all returning an error. I'm trying to create an element with 2 labels: Invalid input ':': expected an identifier character, whitespace, '|', a length specification, a property map or ']' (line 1, column 87) "MATCH ( from {uuid:'set'}),( to {uuid:'model element'}) CREATE from-[r :HasAttribute:ModelElement { Name : 'model element' , cardinality : '0::*' , Type : 'model element' }]->to Return r;" Invalid input ':': expected an identifier character, whitespace, '|', a length specification, a property map or ']' (line 1, column 86) "MATCH ( from {uuid:'set'}),( to {uuid:'model element'}) CREATE from-[r:HasAttribute:ModelElement { Name : 'model element' , cardinality : '0::*' , Type : 'model element' }]->to Return r;" Invalid input ':': expected '`', whitespace, '|', a length specification, a property map or ']' (line 1, column 89) "MATCH ( from {uuid:'set'}),( to {uuid:'model element'}) CREATE from-[r:`Has_Attribute`:`Model_Element` { Name : 'model element' , cardinality : '0::*' , Type : 'model element' }]->to Return r;" The following query runs, but the result is obviously not correct, because I need 2 labels and not a label with a colon (:) MATCH ( from {uuid:'set'}),( to {uuid:'model element'}) CREATE from-[r:`Has_Attribute:Model_Element` { Name : 'model element' , cardinality : '0::*' , Type : 'model element' }]->to Return r; Hope someone can help. -- 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]<mailto:[email protected]>. For more options, visit https://groups.google.com/d/optout. -- 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/d/optout.
