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 7890451
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T06:21:27+00:00 2026-06-03T06:21:27+00:00

I have an SQL based core data managed document, and I present its contents

  • 0

I have an SQL based core data managed document, and I present its contents using a tableview backed by an NSFetchedResultsController. The data is indeed shown and it’s all there, but it is not sorted even though I really tried to make it sort. Here’s how I set the fetched results controller:

- (void)setupFetchedResultsController // attaches an NSFetchRequest to this UITableViewController
{

    NSFetchRequest *request = [NSFetchRequest fetchRequestWithEntityName:@"Notebook"];
    NSSortDescriptor *descriptor=[[NSSortDescriptor alloc] initWithKey:@"name" ascending:YES];
    request.sortDescriptors = [NSArray arrayWithObject:descriptor];
    // no predicate because we want ALL the notebooks

    self.fetchedResultsController = [[NSFetchedResultsController alloc] initWithFetchRequest:request
                                                                    managedObjectContext:self.dbContext
                                                                      sectionNameKeyPath:nil
                                                                               cacheName:nil];

}

name is an attribute of type string. I also tried with another attribute of type NSDate. None of them work – the data is not sorted even when the tableview is presented immediately when the app starts before any changes were applied to the document.

Ideas?

  • 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-03T06:21:29+00:00Added an answer on June 3, 2026 at 6:21 am

    Ok, I guess this one goes into the X-files section of stack overflow. The problem was resolved, and I have no idea what I did to solve it, if at all. I was working on other parts of my app for the past few days, and at some points the results of the fetched results controller started being sorted again. Perhaps it was some bug in Xcode that resolved when I restarted it, or something that I change in another part of the app, I just don’t know. Thanks for the attempts at helping me though…

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

Sidebar

Related Questions

I have a Linq-To-Sql based repository class which I have been successfully using. I
I have an Entity Data Model-based app that uses SQL Server CE 3.5 as
I have a core data based app that manages a bunch of entities. I'm
I'm currently developing an application based on no-sql (using raven db). The core aspect
I have an Informix-SQL based Pawnshop app which calculates an estimate of how much
I have a LINQ to SQL class VoucherRecord based on a simple table. One
I have a combo box with a row source based on an SQL query
I have a solution based on ASP, VB6, COM and SQL Server. The web
I have a SqlCommand object on my c# based asp.net page. The SQL and
I'm pretty new to SQL. I have a database with records based on road/milepoints.

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.