After completing the form and submitting, returns the following array
:
array(
'User' => array(
'password' => '*****',
'nome' => 'Engenharia',
'username' => '[email protected]',
'confirm_password' => '123',
),
'Endereco' => array(
(int) 0 => array(
'cidade_id' => '3091',
'cep' => '96032012',
'rua' => 'Conde de porto alegre',
'numero' => '420',
'bairro' => 'Porto',
'complemento' => 'Empresa'
)
),
'UserGroup' => array(
'group_id' => '2',
'nome' => 'Cliente'
)
)
Then I get the following message:
Database Error Error: SQLSTATE [23502]: Not null violation: 7 ERROR: null value in column "name" violates not-null constraint. DETAIL: Failing row contains (87, 2, 180, null)
Notice: If you want to customize this error message, create app / View / Errors / pdo_error.ctp
But I do not understand where it's taking this nome == null
, because I'm passing the name of User
and I'm passing the name of UserGroup
also, where can I be wrong?