I have a "article" table and "tag" table and they are joined by a "article_tag" table using many to many relationship.
Implementing in Yii2 is a bit difficult to me. Taking example from [here] i am able to save. However it is not very automated, as i have to loop through the tags selected to populate in article_tag. My question more about the "update" part. Updating the records will require me to consider one extra scenerio
if i remove one tag when updating, i have to verify the current data in the database against the newly submitted data and do delete first. I searched answers online to handle this scenerio, however there isnt much info online but simple insert etc.
Anyway Yii2 can handle this automatically?