I think this is impossible, as I understand it. When you assign changes to a property of an NSManagnedObject, CoreData can control the diry status (and undo) for you. If you just try to change diry without data, the potential save operation will not work.
Take a look at " Document Architecture Provides Free Cancellation Support " for how dirty state and cancellation support are implemented.
If you have really large text documents, I suggest not storing them in the CoreData property. As you can read in β Incremental data reads and writes β I suggest storing the text in a separate file and using NSFileWrapper. At least I use this solution for my application.
This is the way. what CoreData offers here is "... However, it is better if you can store BLOBs as resources in the file system and support (for example, URLs or paths) to these resources. Then you can download BLOBs and if necessary"
I do not know what text you have in NSTextView, but you accept "long documents".
source share