I'm new to rethinkdb and have simple trouble. Suppose I have following objects structure:
Table A:
[{
'id': '1',
'b_list': ['11', '12']
}]
Table B:
[{
'id': '11',
'value': 'somevalue1'
},{
'id': '12',
'value': 'somevalue2'
}]
So instance of "A" keeps relations to two "B" instances.
What query should I do in rethinkdb to retrieve following response?
[{
'id': '1',
'b_list': [
{
'id': '11',
'value': 'somevalue1'
},{
'id': '12',
'value': 'somevalue2'
}
]
}]
I want to see instances of B instead of their ids in response and I don't want this change to be saved.
The best way to do this is with an
eq_joinlike so:For a single document: