I have record A in database.
In a transaction I want to do the following :
- Create a record B
- link
parentproperty of A to B :A.parent = B.@rid
Problem is, during a transaction, I get a temporary negative record id.
So @rid has a negative position id.
How can I use it to set the link in the same transaction ?
Thank you
The negative RID means that is temporary. When the transaction is committed a real RID will be assigned, after the commit the RID is changed and it's updated in the object.
Here the doc at the end of the page you can see how transactions works