diff --git a/lib/src/sql/value/get.rs b/lib/src/sql/value/get.rs index 2083510e..2d0f1b57 100644 --- a/lib/src/sql/value/get.rs +++ b/lib/src/sql/value/get.rs @@ -34,7 +34,14 @@ impl Value { // No further embedded fields, so just return this 0 => Ok(Value::Future(v.clone())), // Process the future and fetch the embedded field - _ => v.compute(ctx, opt, txn, None).await?.get(ctx, opt, txn, path).await, + _ => { + // Ensure the future is processed + let fut = &opt.futures(true); + // Get the future return value + let val = v.compute(ctx, fut, txn, None).await?; + // Fetch the embedded field + val.get(ctx, opt, txn, path).await + } } } // Current path part is an object