opened
artiifix
username_0
I have tried the following query in the Data Explorer:
```js
r.db('test').table('teams').get("c525f3e4-4aff-4423-b85c-e9ac9a1f7738").update({
  'members': {'d429f4f3-edd0-41a5-a981-39e5db507760': {
    'role': r.row('members')('d429f4f3-edd0-41a5-a981-39e5db507760')('role').default('user')
  }}
})
```
and it works. I then translated it to Dart:
```dart
Map response = await r.table('teams').get(teamId).update({
  'members': {user.id: {'role': r.row('members')(user.id)('role').rqlDefault('user')}}
}).run(connection);
```
But sadly this throws a `RqlCompileError`:
```
r.row is not defined in this context.
```
This is the data I use:
```js
r.db('test').table('teams').insert([
  {
    'creatorId': 'd429f4f3-edd0-41a5-a981-39e5db507760',
    'id': 'c525f3e4-4aff-4423-b85c-e9ac9a1f7738',
    'members': {
      '5cff7d1c-e0c1-4d45-84d3-1001ef08af0d': { role: 'user' },
      '85257fce-9bd7-4b31-9d50-ca2f626a04e5': { role: 'user' },
      'd429f4f3-edd0-41a5-a981-39e5db507760': { role: 'admin' }
    },
    'name': 'Team Conner'
    }
  }
])
Query that runs in Data Explorer but won't compile in Dart
issue
created
billysometimes
username_1
Thanks for filing! Should be fixed now, the function short-cut r.row wasn't getting wrapped properly.
comment
closed
billysometimes
username_1
issue