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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T16:12:45+00:00 2026-05-13T16:12:45+00:00

I have a basic Core data model like this: Class -Class Name (string) Relationship:

  • 0

I have a basic Core data model like this:

Class

-Class Name (string)

Relationship: HasDetails (to many) -to Details

Details

-Number (int)

-Name (string)

Relationship: IsPartOfClass -to Class

I have two table views, one for “Class” and one for “Details” and have all the bindings set up, however, when I add a new object to Details it shows up for all the Classes, when I want it to show up for only one, the selected one

  • 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-13T16:12:45+00:00Added an answer on May 13, 2026 at 4:12 pm

    There’s a lot of information missing here and your description of your entities is confusing. I strongly urge you to take the time to provide far more detail in the future.

    It sounds as though you have a Class <—->> Details (one-to-many relationship: a Class has many Details and a Details has one Class). Is that right?

    Assuming Class’ details relationship is called “details” and Details’ class relationship is called “class”, and that everything is set up properly in your Managed Object Model (inverse relationships are almost always the right thing to do), you’d want the following:

    1. A “Class” array controller set to Entity mode with entity name set to “Class”. The managedObjectContext will need to be bound as well. Your Classes table view would be bound to this.
    2. A “Details” array controller, also set to Entity mode with entity name “Details”. You’ll bind its “contentSet” to the Class array controller’s “selection.details”. This will provide your Details array controller only with the selected class’s details. The managedObjectContext will need to be bound as well. Your Details table view will be bound to this.

    By doing this, calling the Details array controller’s -add: -insert: and -delete: (or is it “-remove:”?) methods (such as from a button) will automatically treat the relationship correctly (will add the new “Detail” instance to the selected “Class” instance’s details set.

    Make sure you bind the add/insert/remove buttons’ enabled states to the array controller’s “canAdd” and “canRemove” (or is it “canDelete”?) properties so they’re disabled if there’s no selection in the required places.

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

Sidebar

Related Questions

I have this basic one-to-many relationship in Core Data: Brand has N Products Product
I have a core data entity which has an exclusive one to many relationship
I have a very basic email app. The forms class is: class ContactForm(forms.Form): name
I'd like to implement a dynamic property on a Core Data model but am
I have some basic questions about core data (which I am new to) and
I have a basic question regarding populating Core Data with data. I am building
I'm constructing a Core Data NSFetchRequest in objective c. In the data model there
I am new to Core Data, and am designing a schema. I would like
Im new to using core data and having really basic problems. Im trying to
I'm familiar with Core Data basics and have done some dabbling, but have not

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.