class Backend::Db::Vote::Collection

Overview

Addition of the method for eager loading and N+1 avoidance.

Defined in:

backend/db/vote.cr

Instance Method Summary

Instance Method Detail

def with_student(fetch_columns = false, &block : Student::Collection -> ) : self #

def with_student(fetch_columns = false) : self #

def with_teacher_votes(fetch_columns = false, &block : TeacherVote::Collection -> ) : self #

Eager load the has many relation teacher_votes. Use it to avoid N+1 queries.


def with_teacher_votes(fetch_columns = false) #