1
RELATE (
  SELECT * from user where username = 'user_male'
)->interested_in->gender:female;

I used the above RELATE statement to specify that the user_male user is interested in women.

I can't figure out how to UNRELATE this user to that gender; or for example to SELECT all users that are interested in women

Tobias S.
  • 21,159
  • 4
  • 27
  • 45
John
  • 1,081
  • 1
  • 9
  • 34

1 Answers1

3

The edge interested_in becomes its own table from which you can delete rows with the DELETE statement.

To "unrelate" the relation, we only need to delete every entry from interested_in where in.username is 'user_male and where out is gender:female.

DELETE interested_in WHERE in.username = 'user_male' AND out = 'gender:female';
Tobias S.
  • 21,159
  • 4
  • 27
  • 45
  • thank you.. i went the very long route of: DELETE interested_in WHERE gender:female INSIDE ->gender AND count(array::distinct(array::concat(<-user, (SELECT id FROM user WHERE username = "user_male")))) = 1 RETURN BEFORE – John Sep 22 '22 at 16:31