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