How to cancel a NSBatchInsertRequest midway?
The user of my app can import in the ranges of 10k audio files.
How to instantiate a code generated Swift `NSManagedObject` without inserting it in Swift
It is possible to instantiate a NSManagedObject
without inserting it in Swift, similar to Objective C as shown in this answer. For code generated Swift NSManagedObjects context
in CodeGenedObject(context: NSManagedObjectContext)
is not optional?
How to store an array of a Core Data Entity by itself?
I have a core data entity called UpNextItem with the following attributes.
How to ensure there’s only one instance of a core data entity at any one time?
I have an entity called UpNextQueue that has a one to many relationship with UpNextItem. A queue is expected to have 1000s of items and there can only be one queue at any given time in my app.
How to ensure only one instance of a core data entity?
I have an entity called UpNextQueue. It has a one to many relationship with UpNextItem through a property called upNextItems where the queue can have over 10k items. However my app will strictly have only have one up next queue at any given time. How do I enforce this with good design of my code? I have read numerous threads on how doing as such is bad design and I’m unsure on how to handle my use case as I’m unable to find a thread with a similar problem to mine.
How to store large arrays in core data?
I have an entity called AudioFile in my core data database. It has attributes like name, artist, file extension and more which are all string. An audio file is unique as long as both name and file extension are different.