def test_multiple_joins(backend):

    francis_coppola = Director({'name' : 'Francis Coppola'})
    backend.save(francis_coppola)

    al_pacino = Actor({'name': 'Al Pacino'})
    the_godfather = Movie({'title' : 'The Godfather','director' : francis_coppola})
    al_pacino.movies = [the_godfather]

    backend.save(the_godfather)
    backend.update(the_godfather,{'best_actor' : al_pacino})

    result = backend.filter(Movie,{'director.name' : francis_coppola.name,'best_actor.name' : 'Al Pacino'})
    assert len(result) == 1
    assert the_godfather in result

    result = backend.filter(Movie,{'director.name' : {'$in' : [francis_coppola.name,'Al Pacino']}})
    assert len(result) == 1
    assert the_godfather in result

    result = backend.filter(Movie,{'director.name' : {'$in' : []}})
    assert len(result) == 0
dataset/ETHPy150Open adewes/blitzdb/blitzdb/tests/sql/test_basics.py/test_multiple_joins/original