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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T16:11:11+00:00 2026-05-24T16:11:11+00:00

I have two entities event and time. The event entity has a 1 to

  • 0

I have two entities event and time. The event entity has a 1 to many relationship to time entities as each event can be performed multiple times. Now I want to display all the events chronologically in a tableView. So I set up a fetchedResultsController to fetch all time objects, sort them according to the start time and display the event information by using the relationship to the event object. So far so good. But now if the user tabs an entry in the table I pass an event object to the detailViewController where the event can be edited.

The problem is that now only the event entity is marked as updated. I found this out by looking at the userInfo directory of the NSManagedObjectDidChange notification. In consequence the delegate methods on the FRC are not fired as no time objects have been changed.

How can I manually mark a time object as changed to make the FRC recognize the changes and update the cells accordingly? I tried firing the KVO methods willChangeValueForKey and didChangeValueForKey but it did not work so far.

Thanks alot
Thomas

  • 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-05-24T16:11:14+00:00Added an answer on May 24, 2026 at 4:11 pm

    My model is a little different, but it can easily be translated to your one.
    I got a tree-like structure:

    • Element
      • title
      • parent (to-one)
    • Folder : Element
      • children (to-many)
    • File : Element

    When a file gets added or deleted, only the first folder in the queue up gets notified about this change. When a file’s title changes, not a single folder would get notified. So, what to do?
    I tried overriding -willChangeValueForKey: and -didChangeValueForKey: in my Element class.

    - (void)willChangeValueForKey:(NSString *)key
    {
        [super willChangeValueForKey:key];
        [self.parent willChangeValueForKey:@"children"];
    }
    
    - (void)didChangeValueForKey:(NSString *)key
    {
        [super didChangeValueForKey:key];
        [self.parent didChangeValueForKey:@"children"];
    }
    

    Basically, what this does is forcing the parent folder to update because one of its children changed.
    Hope it works for you, too.

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

Sidebar

Related Questions

I have two entities: Patient and Job. Patient has a to-many relationship to Job
I have two entities: User and Event. Each user has a list of events
I have two entities in Doctrine 2.1: Category and Site each category has many
I have two entities User and Event. Each user has a list of events
I have two entities Foo and Bar with a Many to Many relationship between
I have two entities, Entity1 and Entity2, on a one to many relationship. On
I have two entities, a User and Role with a one-to-many relationship from user
I have a many-to-many relationship between the two entities called events and artists, both
I have two entities: parent Customer and child Order . Each Customer has 1,000,000
I have two entities one is Event and another is User. User can like

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.