diff --git a/lib/src/sql/value/get.rs b/lib/src/sql/value/get.rs index 72e28800..bf889e55 100644 --- a/lib/src/sql/value/get.rs +++ b/lib/src/sql/value/get.rs @@ -27,6 +27,16 @@ impl Value { match path.first() { // Get the current path part Some(p) => match self { + // Current path part is an object + Value::Future(v) => { + // Check how many path parts are remaining + match path.len() { + // No further embedded fields, so just return this + 0 => Ok(Value::Future(v.clone())), + // + _ => v.compute(ctx, opt, txn, None).await?.get(ctx, opt, txn, path).await, + } + } // Current path part is an object Value::Object(v) => match p { // If requesting an `id` field, check if it is a complex Record ID