Skip to content
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

Vertex returned server-side script can't be used in a transaction #59

Open
ek-nath opened this issue Mar 25, 2015 · 0 comments
Open

Vertex returned server-side script can't be used in a transaction #59

ek-nath opened this issue Mar 25, 2015 · 0 comments

Comments

@ek-nath
Copy link

ek-nath commented Mar 25, 2015

I'd like to use a server-side function getOrCreateNode to return a vertex and use it to add an Edge.
with something like:

var query = gremlin();
query.var('getOrCreateNode(g, "user_id", "first")', 'v1');
query.var('getOrCreateNode(g, "user_id", "second")', 'v2');
query(g.addEdge('v1', 'v2', 'label', {prop1: 'something'}));
query.var('getOrCreateNode(g, "user_id", "first")', 'v1');
returns
TypeError: Cannot assign to read only property 'identifier' of getOrCreateNode(g, "user_id", "first")
    at GremlinScript.var (/home/goat/code/FS_sync_data_dumper/node_modules/grex/node_modules/gremlin-script/src/gremlinscript.js:90:22)

PS: I am using the latest version in npm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant