I'm trying to select only some columns from my database, but still yes it returns me all. I'm doing the following:
let fetchRequest = NSFetchRequest(entityName: "Father")
fetchRequest.propertiesToFetch = NSArray(objects: "id", "name")
let sorterByName = NSSortDescriptor(key: "name", ascending: true)
fetchRequest.sortDescriptors = NSArray(object: sorterByName)
i have the following columns:
- id
- name
- address
- age
I need select only id and name but returns all columns.