class Marten::DB::ReverseRelation

Defined in:

marten/db/reverse_relation.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(id : String | Nil, model : Model.class, field_id : String) #

[View source]

Instance Method Detail

def field_id : String #

Returns the field ID that initiated the reverse relation.


[View source]
def id : String? #

Returns the ID of the reverse relation.


[View source]
def many_to_one? #

Returns true if the reverse relation is associated with a many to one field.


[View source]
def model : Marten::DB::Model.class #

Returns the model class targetted by the reverse relation.


[View source]
def on_delete : Deletion::Strategy #

Returns the "on delete" strategy to consider for the considered reverse relation.


[View source]
def one_to_one? #

Returns true if the reverse relation is associated with a one to one field.


[View source]