modelContext.fetchIdentifiers(descriptor) errors when using a SortDescriptor to sort by a variable and returns no models. The fetch works fine without a SortDescriptor, thus
FetchDescriptor<MyModel>()
works fine, but
FetchDescriptor<MyModel>(sortBy: [.init(\.title)])
or
FetchDescriptor<MyModel>(sortBy: [SortDescriptor(\.title)])
errors with console message
The operation couldn’t be completed. (SwiftData.SwiftDataError error 1.)
I am using Xcode Version 16.0 beta 6 (16A5230g).