I have such structure of db
5252
Some addresses my not have a metro (other tables have the same problem, for example "user" may not have an address, but there is constraint in "user" table)
If I add a record in mysql it’s ok. If I do the same thing using yii I get an error
Cannot add or update a child row: a foreign key constraint fails (address, CONSTRAINT fk_Address_Area1 FOREIGN KEY (area_id) REFERENCES area (id) ON UPDATE NO ACTION)
So, what’s the problem in?