I have a table A and a table B.
Table B has a relationship with A with the key a_id
.
I already created the document in a in table A. I'm wondering how to insert data in a single query using a doc in table B with foreign key A.
r.db('DB').table('B').insert([{
'b_data': ...,
'a_id': r.db('DB').table('a').filter(r.row['name'] == 'some_name')
} for p in a]).run(conn)