fixed doublicate key issue with categories

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/Guite/MostGenerator/issues/472
| Refs tickets  | -
| License       | MIT
| Doc PR        | -

PR #1561 added the problem, that the category entities cannot deleted an added in the same flush process.
This PR deletes only nonselected from and adds only new categorys to the entity.