I have tables like this:
Notes
ID | NAME | CATEGORY
1 | test | 1
2 | test2| 2
Notes Category
ID | NAME | COUNT
1 | tCat | 1
2 | tCat2| 1
And I have foreign key CATEGORY <-> Notes Category.ID
I try update first record in Notes and set the null as CATEGORY because I want to have notes without category and I get errror:
SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails