Possible to add more than one related persons in one query? #308
Unanswered
yongkansage
asked this question in
Q&A
Replies: 1 comment 3 replies
-
Try doing it in reverse and nesting the queries, each time returning the OutV (which is Bob), like below. For a general introduction on Gremlin, check out the Tinkerpop docs. For all kinds of general questions about the Gremlin query language, check out the Gremlin users mailing list.
|
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When there is 1 to 1 related person, a single query can be written as example shown below to create nodes and edge together.
// Add Persons and and edge in between in one single query!
await g
.AddV(new Person { Name = "Bob", Age = 36 })
.AddE()
.To(_ => __
.AddV(new Person { Name = "Jeff", Age = 27 }))
.FirstAsync();
Is it possible to write a single query to create nodes and edges together for 1 to many related case, such as Bob knows Jeff, Daniel and Tom?
Beta Was this translation helpful? Give feedback.
All reactions