When i have a query like this:
r.db('universe')
.table('Star')
.getAll(
r.db('universe').table('Ship').get(idShip)('idCurrentGalaxy'),
{index: 'idGalaxy'}
)
.changes({includeInitial: true})
I expect it to update the changefeed when
- a selected star gets updated
- the selected ship.idCurrentGalaxy changes
With this query, only 1. is true. If it is possible, how can i change this query to make 2. also true?
The data behind the query could be something like this:
//stars
{id: 1, idGalaxy: 1, name: 'Aldhafera'}
{id: 2, idGalaxy: 1, name: 'Duhr'}
{id: 3, idGalaxy: 2, name: 'Menchib'}
//galaxies
{id: 1, name: 'Milky Way'}
{id: 2, name: 'Andromeda'}
//ships
{id: 1, idCurrentGalaxy: 1}
and the query above would result this:
{id: 1, idGalaxy: 1, name: 'Aldhafera'}
{id: 2, idGalaxy: 1, name: 'Duhr'}