When a DBIx::Class::Result uses this helper it changes the behavior of column accessor methods in newly created objects.
package MyApp::Schema::TestAccessor;
use warnings;
use strict;
use base qw( DBIx::Class::Core );
__PACKAGE__->load_components('Helper::Row::OnColumnMissing');
__PACKAGE__->table('test_accessor');
__PACKAGE__->add_columns(
id => { },
title => { },
user_id => {},
);
sub on_column_missing {'nothing'}
1;
my $obj = $schema->resultset("TestAccessor")->create({id=>2,user_id=>1});
$obj->title; # undef
my @answers = $obj->title; # ()
But:
my $obj = $schema->resultset("TestAccessor")->find(2);
$obj->title; # undef
my @answers = $obj->title; # (undef)
When a DBIx::Class::Result uses this helper it changes the behavior of column accessor methods in newly created objects.
But: