Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
11-01-2021 06:46 PM
create (P1:person {ID: '1', Name: 'Number One', Owner: 'One', Owner_id: 'O1'})
create (P2:person {ID: '2', Name: 'Number Two', Owner: 'Two', Owner_id: 'O2'})
create (P3:person {ID: '3', Name: 'Number Three', Owner: 'Two', Owner_id: 'O2'})
create (P4:person {ID: '4', Name: 'Number Four', Owner: 'Four', Owner_id: 'O4'})
create (P5:person {ID: '5', Name: 'Number Five', Owner: 'Five', Owner_id: 'O5'})
create (P6:person {ID: '6', Name: 'Number Six', Owner: 'Six', Owner_id: 'O6'})
create (P7:person {ID: '7', Name: 'Number Seven', Owner: 'Seven', Owner_id: 'O7'})
create (P1) - [:REL_TO {how_rel:['Son / Daughter']}]->(P2),
(P1) - [:REL_TO {how_rel:['Son / Daughter']}]->(P3),
(P2) - [:REL_TO {how_rel:['Fil / Mil']}]->(P6),
(P2) - [:REL_TO {how_rel:['Fil / Mil']}]->(P5),
(P3) - [:REL_TO {how_rel:['GS / GD']}]->(P4),
(P5) - [:REL_TO {how_rel:['GGS / GGD']}]->(P7)
For the above data the following returns values
MATCH (n:person {ID:'1'})-[r:REL_TO]->(per)
RETURN n, r, per
When a where clause is added there is no result
MATCH (n:person {ID:'1'})-[r:REL_TO]->(per)
WHERE r.how_rel = 'Son / Daughter'
RETURN n, r, per
11-02-2021 10:09 AM
Goodevening,
The value in the relations 'how_rel' seems to be a list type [ ].
I think that you try to compare different data types in your where statement (string vs lists).
If the relation atribute should only be a string, i think then you could remove the [ ].
Yours Kindle Omer
11-02-2021 10:23 AM
Try this:
WHERE 'Son / Daughter' IN r.how_rel
All the sessions of the conference are now available online