iphone Programming Glossary: someentity
Core Data “Upsert” from SQLite Database http://stackoverflow.com/questions/1997212/core-data-upsert-from-sqlite-database predicateWithFormat @ something SOME_NAME NSEntityDescription entityDescription NSEntityDescription entityForName @ SomeEntity inManagedObjectContext managedObjectContext NSFetchRequest fetchRequest NSFetchRequest alloc init autorelease fetchRequest.. executeFetchRequest fetchRequest error fetchError if array nil handle error else if array count 0 SomeEntity entity NSEntityDescription insertNewObjectForEntityForName @ SomeEntity inManagedObjectContext managedObjectContext.. nil handle error else if array count 0 SomeEntity entity NSEntityDescription insertNewObjectForEntityForName @ SomeEntity inManagedObjectContext managedObjectContext entity.name someName here I call a method that attempts to add the relationships..
Retrieving a unique result set with Core Data http://stackoverflow.com/questions/2656227/retrieving-a-unique-result-set-with-core-data a core data based app that manages a bunch of entities. I'm looking to be able to do the following. I have an entity SomeEntity with the attributes name type rank foo1 foo2. Now SomeEntity has several rows if we're speaking strictly in SQL terms. What.. looking to be able to do the following. I have an entity SomeEntity with the attributes name type rank foo1 foo2. Now SomeEntity has several rows if we're speaking strictly in SQL terms. What I'm trying to accomplish is to retrieve only available types.. NSArray arrayWithObjects @ type @ rank nil NSEntityDescription entity NSEntityDescription entityForName @ SomeEntity inManagedObjectContext managedObjectContext fetchRequest setEntity entity sort by rank NSSortDescriptor rankDescriptor NSSortDescriptor..
|