Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8992189
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T22:53:48+00:00 2026-06-15T22:53:48+00:00

I get this error: core data data store missing getting error:’NSInvalidArgumentException’, reason: keypath flowData.flowAmount

  • 0

I get this error:

core data data store missing getting error:’NSInvalidArgumentException’,
reason: keypath flowData.flowAmount not found in entity <NSSQLEntity FlowData id=1>

when trying to load data from a core data store into a tableview.

The sqlite database is being re-created the next time I run the app after I remove the app from the Simulator after having changed the data model and reversioned it.

I am able to insert into the database. This dump shows the record I just entered:

INSERT INTO "ZFLOWDATA" 
VALUES(1,1,1,NULL,8.0,376884478.384176,376884471.83175,8.0);

However when I try to read from the data store I get the above error.

Here’s the relevant code for when I’m trying to load the data:

- (void)viewDidLoad
{
    [super viewDidLoad];
    NSError *error;
     if (![[self fetchedResultsController] performFetch:&error]) {
          NSLog(@"Unresolved error %@, %@", error, [error userInfo]);
          exit(-1);  // Fail
     }
    self.title = @"Flow Data Items";
}

and

- (NSFetchedResultsController *)fetchedResultsController {



    jhsAppDelegate *appDelegate = (jhsAppDelegate *)[[UIApplication sharedApplication]delegate];

    managedObjectContext = [appDelegate managedObjectContext];



    if (fetchedResultsController != nil) {
        return fetchedResultsController;

    }
    NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init];

    NSEntityDescription *entity = [NSEntityDescription
                                   entityForName:@"FlowData" inManagedObjectContext:managedObjectContext];

    [fetchRequest setEntity:entity];

    NSSortDescriptor *sort = [[NSSortDescriptor alloc] initWithKey:@"FlowData.flowAmount"
                                                         ascending:NO];

    [fetchRequest setSortDescriptors:[NSArray arrayWithObject:sort]];    
    [fetchRequest setFetchBatchSize:20];
    NSFetchedResultsController *theFetchedResultsController =
    [[NSFetchedResultsController alloc] initWithFetchRequest:fetchRequest
                                        managedObjectContext:managedObjectContext sectionNameKeyPath:nil
                                                   cacheName:@"Root"];

    self.fetchedResultsController = theFetchedResultsController;
    self.fetchedResultsController.delegate = self;
    return fetchedResultsController;
}

and here’s my data model:

enter image description here

and finally, here’s my data model class code for the entity:

#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>

@interface FlowData : NSManagedObject

@property (nonatomic, retain) NSNumber * flowAmount;
@property (nonatomic, retain) NSDate * flowEnteredDateTime;
@property (nonatomic, retain) NSDate * flowOccurrenceDateTime;
@property (nonatomic, retain) NSNumber * flowScheduledFrequencyMinutes;
@property (nonatomic, retain) NSNumber * flowUrgency;

@end

It must be something about how I am trying to read in the data since I am able to insert a row on another viewcontroller because I believe that FlowData.flowAmount does exist on the entity as it is being inserted into the entity.

Any ideas? Does the order in which the attributes are listed in the .h file have to match the order in the actual data model? Do my data types match?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T22:53:50+00:00Added an answer on June 15, 2026 at 10:53 pm

    The key for your sortDescriptor should be just flowAmount.
    No need to also prepend the entity name.

    PS: The order of the properties in the class is irrelevant. Your data types match (float and NSNumber).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I get this error in my app { error: { message: Missing client_id parameter.,
I am struggling with Core data. I get the infamous error Failed to call
I get this response: {success:true,errorCode:-1,error:} No HTML inside the JSON, but the js say
I get this error while accessing a php script: W/System.err: Error reading from ./org/apache/harmony/awt/www/content/text/html.class
I get this error when i try to upload an image: OSError at /upload/
I get this error on my Ice Cream Sandwich (Android 4.0) device and emulator.
I get this error when I run the code below. I have normally used
I get this error when I use simplejson from django.utils in google app engine
i get this error Cannot open database DataLayer.Context.MedicallexiconContext requested by the login. The login
I get this error TypeError at /debate/1/ get_context_data() takes exactly 2 arguments (1 given)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.