تخطَّ إلى المحتوى

Early Materialization (ARCH9056)

هذا المحتوى غير متوفر بلغتك بعد.

Key swift.orm.early-materialization · Severity warning · Category orm

Flags fetched results filtered / sorted in memory (try context.fetch(r).filter { }) when the fetch request could carry the predicate.

let active = try context.fetch(request).filter { $0.active }
request.predicate = NSPredicate(format: "active == YES")

Put the predicate and sort descriptors on the fetch request.