I assume that you mean "attribute" instead of "ivar". Your scheme to have a string breaks into a set and then save the set is arguably debatable, but I assume this is not a problem.
Why do you need a managed entity to be marked as dirty? It really is not necessary. Just keep it dirty or not!
I do not know how you check the “dirtyness” of your managed entity, but I assume that you want this to cause persistence at some point. At this point, you can check your own BOOL "dirtyFlag" in the same way, which you can set accordingly and save for verification.
It is always better to make such things clear. Your code will become more readable and transparent.
Mundi source share