ActiveAndroid Many-to-many relationship

前端 未结 3 1500
忘掉有多难
忘掉有多难 2021-01-05 06:33

I’m currently using ActiveAndroid, and have been trying to get a many-to-many relationship to work for the past few hours, however I just can’t get it to work. I hope you ca

3条回答
  •  离开以前
    2021-01-05 07:05

    I wouldn't use getMany for this. I'd do this instead:

    return new Select()
        .from(Student.class)
        .innerJoin(StudentCourse.class).on("students.id = studentcourses.id")
        .where("studentcourses.course = ?", courseId)
        .execute();
    

提交回复
热议问题