is that two associated tables. The
data structure is similar to Weibo: content + N pictures
I am divided into two tables, one table records the content, the other records the picture. Through the ID of the content, I associate
, that is, the relation relationship of HAS_MANY
, and then I want to add, delete, delete and change the picture
at the front end. I have thought of two ways:
1, delete all the pictures and write them all, that is, every time the picture list is modified and submitted to the backend, all the old ones will be deleted. And then write the new one in.
2. The deleted ID and newly added data recorded at the front end are transferred to the backend for deletion and addition.
I would like to know what method is generally used for deletion and modification?