sub new { my ( $class, $attr ) = @_; foreach my $col ( $class->columns ) { my $col_info = $class->column_info( $col ); if ( ! defined $attr->{$col} && exists $col_info->{default_value} && ! $col_info->{is_auto_increment} ) { $attr->{$col} = $col_info->{default_value}; } } return $class->next::method( $attr ); }