Hi everyone,
I store a float number in my SQLite (through core data) like this:
unit.conversion = [NSNumber numberWithFloat:0.001];
When I look at the SQLite database the value is 0.0010000000474974513
unit.conversion is an optional float in my datamodel...
What's wrong with that?
Thanks
...
I have an app I am working on that has 2 entities linked by a relationship (many to many). I currently have the app set up so that the rootviewcontroller controls the NSManagedObject (getting, setting, deleting of the data) in the first entity. When I drill down into on of the first entities it goes to a secondview (secondviewcontroller...
Hi,
Im using Core data. I have an entity with an attribute of type Date. Is there a way I can set Default Values as Current Date? (Like entering 'CURRENTDATE' or something in default value of the attribute?)
Thanks
...
I know this is a frequently asked question, however none of the solutions that I have found seem to work for me.
This is my situation:
I have one data model for my application, and I wanted to add versioning to it. So in XCode, I did Design -> Data Model -> Add Model Version. I also updated my delegate's persistentStoreCoordinator metho...
What I'm trying to build is an application that allows users to add a category to the first entity (CategoryItem) and then add feeds to that via a second entity (FeedItem).
So far, the CategoryItem entity has *action attribute which is used as the naming of the category (String). The FeedItem entity has two attributes, *feedName and *f...
Hello,
In some part of my app I replace the db.sqlite file used by CoreData to store all my app data but the loaded data doesn't change. I noticed that the new data is only shown when I restart the app. Maybe someone can explain-me why this happens and how to solve it.
Thank you very much,
...
Hi.
If a Core Data relationship has an inverse relationship do you only need to set one of the relationships objects then the corresponding relationship is setup?
In the past I have set both relationships but when looking at iPhone Core Data Recipes it seems they only set 1 of the relationships?
Thanks
James
...
I have a managed Object Model that contains 2 Entities.
One of the entities (Lets Call it EA) calculates it's properties by referencing some properties in a sub-set of the second entity (Call it EB).
Within EA I have set up a "Fetched Property" with a predicate that returns the subset of EB objects that I need.
When I Delete, Insert a...
I'm having a strange performance issue with core data and compound predicates. I have no problem doing very basic predicates or relatively complex ones, but if I try to create one that is 'somewhere in the middle' (a basic numeric match and an 'or' of a to-many relationship; see the 3rd example below), the app becomes un-responsive and h...
Does anyone have some tips as to how to insert tablecells when CoreData objects have been added? What possibilities does coredata have to notify the tableView? Or should the tableView monitor CoreData? Will I get into trouble when doing a reloadData?
I am looking for a/the way to do this. I can probably figure the code out from there.
...
Background
I've got an NSOutlineView that shows TrainingGroup entities.
Each TrainingGroup represents a folder on the local machine.
The NSOutlineView is bound to an NSTreeController with a fetch predicate of IsTrained == 0
Each TrainingGroup can be assigned to a project.
Each TrainingGroup has many TrainingEntries that show a time wor...
Hello all (but mostly Dave),
I am playing around with Dave DeLong's excellent CHCSVParser for Objective-C with an extremely long .CSV file and am running into some trouble using it. I would use the arrayWithContentsOfCSVFile method, but I'm running the code on an iPhone and parsing the whole file into memory would take more memory than...
I'm running a splitview core data template setup for an iPad app. When a row was selected on the left tableview it would case the selected object of the row to be assigned to the right side view(DetailViewController) and update the view with the proper data. Below is the code that does the assigning in the left side controller(RootViewCo...
I have table view which is in a view controller that inherits from UITableViewController.
I use a NSFetchedResultsController that I use to fetch the table data from my core data store. I've tried it with both caching on and off.
I set the delegate of the NSFetchedResultsController to be self and I've implemented controllerDidChangeCont...
I have an iPhone app that is using CoreData. I recently made some minor changes to the data model and now every time the app is opened I get an error "Can't find model for source store".
I have 2 version of the data model and the only changes I've made were some additions of some fields. I was following the guide here which worked initi...
I'm using CoreData backed by SQLite and I'm trying to find the fastest way to exclude rows where the field AirDate ends with -00-00
I've noticed that
[NSPredicate predicateWithFormat:@"NOT AirDate CONTAINS %@", @"-00-00"]
is much faster than
[NSPredicate predicateWithFormat:@"NOT AirDate LIKE %@", @"*-00-00"]
Are there any other o...
I try [eventArray value] but nothing - i get like that
78999
3451237
3451237
But must be
90
NSEntityDescription *entity = [NSEntityDescription entityForName:@"Event" inManagedObjectContext:app.managedObjectContext];
NSFetchRequest *request = [[NSFetchRequest alloc] init];
[request setEntity:entity];
NSSortDescriptor *sortD...
Hi!
In the model, I have two entities: Record and Category. Category is one-to-many with Record through inverse relationship. The persistent store is of SQLITE type and the db is not so small, about 23MB (17k records).
I use a list-detail design to show the records table and the detailed record view.The list viewController uses NSFetch...
After migration, one of my numerical values that should be non-zero now appears as zero. If I don't migrate, the value retains its non-zero value.
I first tried to set a number value in a managed object like this:
[temp setNumUses:temp.numUses+1];
... but that caused an'EXC_BAD_ACCESS' so I changed it to:
int hold = ((int)[[temp val...
Hi,
I'm trying to save a location and retrieve the location on a map afterward using Core Location, MapKit and Core Data frameworks.
What I've done is I just made entity named POI and added properties such as latitude (double type), longitude (double type) with few others.
Simply put, my app saves POI with two NSNumbers. (lat and l...