-
-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to clone a vertex with edges #553
Comments
Hello @danielcweber, |
@rautjris For clarification: It seems that you're trying to write a query in Gremlinq when it's unclear how the query could be written in raw Gremlin. Such questions are probably better formed as a question on [https://groups.google.com/g/gremlin-users](the mailing list). |
@danielcweber I'm using the ExRam.Gremlinq and trying to do similar "clone a node and it's edges" like in this Stackoverflow post using the ExRam.Gremlinq. So I'm selecting the source properties and trying to set those in clone properties.
|
That would surely work well in Gremlin, however, property-overloads that would take traversals for key and value are, as it is now, not part of Gremlinq. It might be implemented in an upcoming release though. PRs, as always, are always appreciated. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Discussed in #552
Originally posted by rautjris February 25, 2022
Hi !
Need some advice how to clone a Vertex with it's properties and Edges/edge properties to a new Vertex.
I'm newbie with gremlin and using Cosmos Db gremlin.
This is what I have now:
await g.V(sourceid).As((, source) => _
.AddV(new SampleVertex())
.As(( _ , clone) => _
.SideEffect(s =>
{
return s.Select(source).OutE().As(( _ , e) => _
.Select(e).InV().AddE().From(f => f.Select(clone)));
}
)
));
But I'm out of ideas how to copy properties.
Thanks in advance
The text was updated successfully, but these errors were encountered: