Hasmany relation with edit in single form

Hi,

I made a form where I can edit entity article and its related HasMany relation with comments in one form.

For example

-> Article.name,

-> Comment.1.id, Comment.1.name
-> Comment.2.id, Comment.2.name
-> Comment.3.id, Comment.3.name

When I remove comment 2 from this list (using javascript) and then click save. The comment will still persist in the database. How to make sure the comments not on this list get removed?