Finding a list of related objects by ID
问题 Let's say for example I have a bridge table called PersonAnimal . I want to search for all the people who have a given animal's ID. The query so far looks like: Animal animal = getById(Animal.class, animalId) ObjectSelect .query(PersonAnimal.class) .where(PersonAnimal.ANIMAL.eq(animal)) .select(context) However the first line in the above code segment shows that I first have to retrieve the related object from the database. I want to get rid of that database lookup and instead do something