Próbuję sobie stworzyć generator CRUD. I np mam np taka tabele z relacjami :
CREATE TABLE `users` ( `id_user` INT(11) NOT NULL AUTO_INCREMENT, `role_id` INT(11) NOT NULL DEFAULT '0', `password` VARCHAR(50) NOT NULL, `username` VARCHAR(50) NOT NULL, `created_at` DATETIME NOT NULL, `updated_at` DATETIME NOT NULL, `invheader_id` INT(11) NOT NULL, PRIMARY KEY (`id_user`), INDEX `invheader_id` (`invheader_id`), INDEX `FK_users_roles_hasOne` (`role_id`), CONSTRAINT `FK_users_invheader_hasMany` FOREIGN KEY (`invheader_id`) REFERENCES `invheader` (`id_invheader`), CONSTRAINT `FK_users_roles_hasOne` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id_role`) )
Powstaje pytanie czy podczas edycji takiego rekordu w formularzu powinny się zawieć dane do edycji z tabel referencyjnych czy tylko te dane ktore sa w tabeli podstawowej?