Error saving with cakephp

-2

Hello.

I do not understand why this error. The code is apparently correct.

link

Follow error print:

link

The user table fields are:

table users id, name, email, password. In the Expense table you have the primary key of the user fk_id_user references users (id). I do not understand errors of this type!

    
asked by anonymous 17.08.2017 / 18:40

1 answer

-1

In fact the error is very explanatory.

You put a pk in the Users table that does not exist:

public $primaryKey='id_despesa';

In other words, the id_expensity field does not exist in the table.

    
17.08.2017 / 18:44