Questions tagged as 'core-data'

1
answer

How to configure predicate to return only 2 columns?

Scenery: Do a query using CoreData looking for records with a city and state, and return only the 'name' and 'address' columns of the location. I'm currently using the following query: // Array to be returned NSMutableArray* arrayRegi...
asked by 11.10.2015 / 16:45
1
answer

Transaction / Commit in Core Data, is it possible?

Is there a concept of Transaction and Commit in Core Data? I have a base in the app that is fed by an external file, however there are a lot of data and the application takes around 2 minutes to perform this import so I need to run it in the...
asked by 18.08.2015 / 23:04
1
answer

Best practice of data persistence

When it comes to persisting data with Core Data . What is the best way to persist the data? For example:    I have an object Pessoa (subclass of NSObject ). And at the time of   persistence I "convert" PessoaMO (s...
asked by 20.11.2014 / 17:54
1
answer

Relationship is equal to 0

I'm new to relationship in core data and I do not know what's going on. I have a many-to-many relationship between the News & Friends entity as shown below: I created NSManagedobject Subclass but did not change anything (I do not know if t...
asked by 19.10.2016 / 20:34
1
answer

How to configure NSPredicate to perform filtering?

I'm implementing a filter, where I need to search the records in Core Data, which have "yes" in certain columns. Table: Forexample,returningtheelementsthathaveyesinthecolumnsATTRIBUTE1,ATTRIBUTE3,andATTRIBUTE5InthisexampleIwouldreturnthere...
asked by 26.02.2015 / 17:50
1
answer

Use Core Data or another API to interact with sqlite?

I was researching on how to save data on iPhone and iPads and came across many options, each with its complexity and purpose. Apple recommends that whatever app, which uses Core Data, is nothing more than a layer to interact with a SQLite databa...
asked by 30.07.2014 / 22:01
1
answer

Query based on relationship, using NSPredicate on Core Data

I have a one-to-many relationship between the Pai and Filho entities, where a Pai can have any or N Filho . Using Core Data , how do I search all Filho , basing my search for a Pai . For example: I have...
asked by 07.11.2014 / 18:58
1
answer

Remove Core Data from a Xcode project

I started developing an application using Core Data in the course of project development and found that Core Data is not the best for the application. In this scenario, I would like to know how to remove Core Data completely f...
asked by 29.09.2015 / 14:24
1
answer

NSObjectInaccessibleException - Deleting all objects from an entity - NSFetchedResultsController

I have a function responsible for deleting all the items of an entity: func removeItens() { if let managedContext = managedObjectContext { let fetchRequest = NSFetchRequest() let entity = NSEntityDescription.entityForName(...
asked by 02.02.2015 / 15:30
1
answer

Inherited NSPredicate Filter

I have a structure in Core Data like this: Cliente --- id = inteiro --- dados = Pessoa Pessoa --- nome = string PessoaFisica < Pessoa --- cpf = string PessoaJuridica < Pessoa --- cnpj = string How can I filter Customer based on...
asked by 29.05.2014 / 16:12