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

How to let the user know of the added uuid in a given txn #3

Open
ramukima opened this issue Jun 12, 2014 · 1 comment
Open

How to let the user know of the added uuid in a given txn #3

ramukima opened this issue Jun 12, 2014 · 1 comment

Comments

@ramukima
Copy link

I understand that the 'uuid' is added as part of beforeCommit transaction as a property on nodes/edges added within a given transaction. What I do not understand is, how do I expose the newly added 'uuid' to the caller after the transaction is over ?

Say for example my function does these four steps -

  1. Create a new transaction
  2. Add a vertex
  3. Commit transaction
  4. Return details of the vertex added as JSON.

I have exposed my function as an API to a caller. After step 4, I expect the newly added uuid to be returned to the caller. Will it automatically be available during vertex to JSON serialization in step 4 or I have to fetch the vertex again to know the value of 'implicitly' added 'uuid' ?

@sarmbruster
Copy link
Owner

There seems to be a known issue that changes done by TransactionEventHandlers are not visible in the result of the same transaction.
Workaround is to query the node by its id afterwards in a separate transaction - this one should contain the uuid.
Being in progress for updating neo4j-uuid for current releases of Neo4j.

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

2 participants