class Guest::Collection

Overview

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

Defined in:

models/guest.cr:2
models/guest.cr:34

Instance Method Summary

Instance Method Detail

def by_tenant(tenant_id) #

[View source]
def with_attendees(fetch_columns = false, &block : Attendee::Collection -> ) : self #

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


def with_attendees(fetch_columns = false) #

def with_tenant(fetch_columns = false, &block : Tenant::Collection -> ) : self #

def with_tenant(fetch_columns = false) : self #