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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:58:42+00:00 2026-06-15T08:58:42+00:00

I have an entity, let’s call it Parent, Parent has up to 5 Child

  • 0

I have an entity, let’s call it Parent, Parent has up to 5 Child entities as a to-many relationship.

I am displaying these “Parent” relationships in a UITableView; when a user selects the row for a Parent entity I want to display another view that shows some detailed information for this Parent, including all of the Child entities (if any).

What I don’t understand is how I get these Child entities out of Core Data!!! I’ve tried everything, I’ve tried to refresh the Parent from the managed context, I’ve tried to grab it again from the managed context using:

[managedObjectContext existingObjectWithID:[swingSession objectID] error:&error];

I am literally at my wits end, I have no idea what to do!!!

Please help, what am I missing????

  • 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-15T08:58:43+00:00Added an answer on June 15, 2026 at 8:58 am

    You can access the child by the NSSet property in the parent object like so:

    NSLog(@"This is a child object: %@", [[parent.children allObjects]objectAtIndex:0]);
    

    This is assuming the relationships are set correctly. A to-Many relationship is an NSSet type.

    Your entity should be set up like this:

    Parent.children(relationship)<->>Child.parent(relationship)
    

    make sure you set up an inverse To-One relationship on the child to the parent.

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

Sidebar

Related Questions

Let say I have an entity user which has a one to many relationship
I have an entity, let's call it CommonEntity that has a primary key used
Let's say I have an entity called EntityA . EntityA has a relationship to
Let's say we have an entity that has attributes att1 and att2, where att1
Let's I have entity A and entity B . Entity A have @OneToOne relationship
Let's say I have an entity Author which has a name can write 0
Let's say I have an entity called Game which has a home_school_id . I
I have an entity type, let's call it Transaction, created by entity framework version
I have 2 Entity Framework entity sets with many-to-many relationship (compromised of 3 DB
Let's say I have this entity (for Hibernate): @Entity public class Person { @Id

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.