[html-formfu] $form->model->create error

Octavian Rasnita orasnita at gmail.com
Mon Jan 12 10:04:03 GMT 2009


Hello,

In a Catalyst Controller I've tried to create a new row using:

$form->model->create({hash => $hash});

In MyApp.pm I have:

__PACKAGE__->config(
  'Controller::HTML::FormFu' => {
    model_stash => {
      schema => 'DB',
    },
  }
);

In the form's configuration I have:

<model_config>
resultset TempUser
</model_config>

But after I submit the form I receive the following error in the browser:

DBIx::Class::Row::update_or_insert(): DBI Exception: DBD::mysql::st execute 
failed: Field 'hash' doesn't have a default value [for Statement "INSERT 
INTO
temp_user (email, first_name, last_name, password, sex, username) VALUES (?, 
?, ?, ?, ?, ?)" with ParamValues: 0='oijoijjjj at fufu.ru', 1='j', 2='j', 
3='b08e013eb57dd4faafbc52a721b4d255e177ba57',
4='barbatesc', 5='oijoiju'] at E:/perl510/site/lib/HTML/FormFu/Model/DBIC.pm 
line 376

Am I missing something?

I've just installed the latest version (0.03007) of 
HTML::FormFu::Model::DBIC and the latest version of HTML::FormFu also.
I use ActivePerl 5.10.0 build 1004 under Win XP Pro.

Thank you.

Octavian




More information about the HTML-FormFu mailing list