Or IOS handles that for me automatically?
That depends how you configured your db. In Xcode you have this setting in your xcdatamodel file.
Look here: