diff --git a/Sam/Calendar.pm b/Sam/Calendar.pm index e48815ad03bce777029357b7e019f4bd0ec8521c..d57bc6fe93989ab9b853587e3fa97b7f9ec9dbc2 100644 --- a/Sam/Calendar.pm +++ b/Sam/Calendar.pm @@ -20,6 +20,22 @@ __PACKAGE__->meta->setup ], primary_key_columns => [ 'id' ], + + relationships => + [ + chans => + { + type => 'one to many', + class => 'Sam::Chan', + column_map => { id => 'calendar_id' }, + }, + events => + { + type => 'one to many', + class => 'Sam::Event', + column_map => { id => 'calendar_id' }, + }, + ], ); 1;