You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@age.apache.org by "waleedahmed0001 (via GitHub)" <gi...@apache.org> on 2023/06/24 12:54:19 UTC

[GitHub] [age] waleedahmed0001 commented on issue #1006: Creating a node and setting one of it's property to be equal to it's id terminates the server abnormally

waleedahmed0001 commented on issue #1006:
URL: https://github.com/apache/age/issues/1006#issuecomment-1605463344

   You are trying to access a value before its set. You have to wait for setting of this value and then you can use that in the next line.
   
   If you make it in two queries, it will work fine:
   
   ```
   SELECT * FROM cypher('online_orders', $$
       CREATE (u:User {name: 'user1', email: 'user1@email.com', phone: '1234-5678'})
       RETURN u
   $$) AS (u agtype);
   
   SELECT * FROM cypher('online_orders', $$
       MATCH (u:User)
       WHERE u.name = 'user1' -- Replace with the appropriate condition to identify the node
       SET u.order_id = id(u)
       RETURN u
   $$) AS (u agtype);
   
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@age.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org