class Backend::Db::Teacher::Collection
- Backend::Db::Teacher::Collection
- Clear::Model::CollectionBase(Backend::Db::Teacher)
- Reference
- Object
Overview
Addition of the method for eager loading and N+1 avoidance.
Defined in:
backend/db/teacher.crInstance Method Summary
-
#with_student_assignments(fetch_columns = false, &block : StudentAssignment::Collection -> ) : self
Eager load the has many relation student_assignments.
- #with_student_assignments(fetch_columns = false)
-
#with_teacher_votes(fetch_columns = false, &block : TeacherVote::Collection -> ) : self
Eager load the has many relation teacher_votes.
- #with_teacher_votes(fetch_columns = false)
- #with_user(fetch_columns = false, &block : User::Collection -> ) : self
- #with_user(fetch_columns = false) : self
Instance Method Detail
def with_student_assignments(fetch_columns = false, &block : StudentAssignment::Collection -> ) : self
#
Eager load the has many relation student_assignments. Use it to avoid N+1 queries.
Eager load the has many relation teacher_votes. Use it to avoid N+1 queries.