Insert Into edge with two possible target vertices

Hello all.
I’m writing a query in the tgcloud 3.4.0 editor.
I am attempting to add an edge from PERSON to LEARNER.
The edge name is: “IsA”.

INSERT INTO IsA (FROM, TO, createTime) VALUES (
    keyPerson,
    keyLearner,
    regDate
  );

However, there is another edge going from PERSON to another vertex, HELPER, with the same name: “IsA”.
The error I’m receiving on the query is that I must provide a HINT as to the target vertex. I found nothing about this hint in the documentation.
How is this hint provided?

image

I checked the docs: Data Modification Statements :: Docs

You will probably be good with something similar to:

INSERT INTO worksFor (FROM, TO, startYear) VALUES (name3 person, comp company, 2000 + 17);

Notice name3 person and comp company. Where name3 and comp are the values, and person and company are Vertex types.

Hope that helps.

1 Like

Thank you! Looks fine now.