More for my own personal reference
Within a resultset (row) object
my $schema = $self->result_source->schema();
Example reasoning
User wants to be able to obtain (via helper method) all the public groups s/he doesn't belong to
sub public_usergroups {
my ($self) = @_;
my $schema = $self->result_source->schema();
my @public_usergroups = $schema->resultset('Usergroup')->search({
id_usergroup => {
'NOT IN' => $self->user2usergroups->get_column('id_usergroup')->as_query,
},
is_public => 1,
});
return @public_usergroups;
}
The returned set are then also Usergroup objects, so they have the methods relating to those.
Subscribe to:
Post Comments (Atom)
3 comments:
Thanks for your help in describing this. Great review! Also turn your attention that it needs to search for mobile software development companies if you need android applications development.
It's well done article. Let me mention about home insurance with discounts home insurance companies. Save on free online rates on homeowners insurance.
Thank you for posting this great info. You have affordable possibility to get info about casino affiliate. The most common casino programs such as go wild affiliate and great poker rooms such as red bet affiliates.
Post a Comment