Change multiple queries to one Transaction

I was trying to run one transaction instead of multiple queries but it didn’t work. Then I came across this post and it says it is impossible:

Basically what it mentioned is exactly what I was trying to do:

  1. Run query A
  2. Get the objectId property from the first object from the result of query A
  3. Use (2) in the second query

So is there any way that I can do this in one query?

Hi @Barry ,

Unfortunatelly this is still not supported. Mark explained this with details in the refferenced topic:

At the time when the where clause is composed for the second query, the result from the first one is not available. The where clause cannot include a reference to a result, it should be a complete scalar value by the time the entire sequence of operations is sent to the server in the transaction.

Regards, Andriy