in my case, I found the cause is the use of ModelContext's batched fetch method:
func fetch<T>( _ descriptor: FetchDescriptor<T>, batchSize: Int ) throws -> FetchResultsCollection<T> where T : PersistentModel
The cure for my code is replacing this problematic fetch with the plain fetch method:
func fetch<T>(_ descriptor: FetchDescriptor<T>) throws -> [T] where T : PersistentModel
I am not sure this cure is effective in other cases but I feel the current maturity of the batched fetch is very low and very unstable.
Topic:
App & System Services
SubTopic:
iCloud & Data
Tags: