Allow joins on body fields
Massive JS does not support joins in the body level. It would be good to have this feature.
Use case
Schemas
Say I have the following schemas
users
{
id,
body: {
name,
age,
etc
}
}
transactions
{
id,
body: {
type,
user_id, // Refers to users.id
}
}
Code
Example code usage that would allow body joins
1
db.users.join({
transations: {
type: 'INNER',
on: {'body.user_id': 'id'}
}
}).find({})
2
db.users.join({
transations: {
type: 'INNER',
on: {body: {user_id: 'id'}}
}
}).find({})