Ir al contenido

Unbounded Fetch (ARCH9061)

Esta página aún no está disponible en tu idioma.

Key swift.orm.unbounded-query-no-limit · Severity warning · Category orm

Flags NSFetchRequest executed without fetchLimit or fetchBatchSize - the whole table loads into memory.

let request = Order.fetchRequest()
let all = try context.fetch(request)
let request = Order.fetchRequest()
request.fetchBatchSize = 100
let page = try context.fetch(request)

Set fetchLimit / fetchBatchSize or use a fetched results controller.