Thanks for the reply but it was not working. If I try to save address with static address_header_id it save without any error and also if I try to get save data from address_header and contain address i get data issue only in saving when I try to save data associated
Are you trying to create a circular reference? It looks like Address_header is related to Address via “no_of_addresses” the way you use it, and Address is related to Address_header via “address_header_id”.
This will get you in trouble. You should have only 1 (foreign key) relationship betwee one and the other to prevent problems. If you use “address_header_id” as the FK relation to Address, then “no_of_addresses” should just remain a number.
That means you would first create an Address_header, and then an Address.
If you get error messages, please copy them and paste them here so it is clear what errors you are running into.
I also remove column no_of_addresses for any confusion. We need to save multiple address under one address header id. when i run above code it create entery in address_header but did not make any entry in addresses table.