- or download this
package MyApp::Schema::Result::User;
...
{ role => "role" },
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE"
+ },
);
- or download this
foreach my $page ($c->user->pages) {
# do something with $page
}
- or download this
sub pages {
my ($self) = @_;
...
}
);
}
- or download this
package MyApp::Schema::ResultSet::RolePage;
...
extends qw/MyApp::Schema::ResultSetX::DisplayTable/;
has '+name' => ( default => 'RolePage' );
- or download this
sub pages {
my $self = shift;
...
# Alternatively, if you need to eliminate duplicates:
# ->search_related('page_name', {}, {distinct => 1});
}