-package # hide from PAUSE
+package # hide from PAUSE
RestrictByUserTest::Schema::Users;
use base 'DBIx::Class';
__PACKAGE__->add_columns(
'id' => {
data_type => 'int',
- is_nullable => 0,
+ is_nullable => 0,
is_auto_increment => 1,
},
'name' => {
sub restrict_Notes_resultset {
my $self = shift; #the User object
my $unrestricted_rs = shift;
-
+
return $self->related_resultset('notes');
}
sub restrict_MY_Notes_resultset {
my $self = shift; #the User object
my $unrestricted_rs = shift;
-
+
return $unrestricted_rs->search_rs( { user_id => $self->id } );
}