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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T04:55:12+00:00 2026-05-24T04:55:12+00:00

The setup: CoreData Model Product Entity Attribute name Relationship common <—> CommonData CommonData Entity

  • 0

The setup:

CoreData Model

  • Product Entity

    • Attribute “name”
    • Relationship “common” <—> CommonData
  • CommonData Entity

    • Attribute “product_id”
    • Relationship “product” <—> Product Entity

View Setup:

  • I have a NSTableView to display the product entities and it is bound to an NSArrayController
  • There are two buttons “+” and “-” bound to add: and remove: to the respective actions of the NSArrayController.
  • There is an NSObject controller bound to the selection.common content object, with a NSTextView bound to the NSObjectController.

In the Cocoa documentation, it states that the Releationship Entity is not automatically create when, in this case, the product entity is allocated. I can see this behavior when I click the “+” button. The product is added to the NSTableView, but the NSTextView displays “No Context”. And, if I create the product and common entities in code, I can see NSTextView display the *product_id* correctly.

I would like to be able to keep the buttons bound to the NSArrayController.

The Question:

  • Is there any way to detect that the new product entity has been created?
  • What is the best way to add the relationship entity when the new product entity is created via a button action?
  • 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-24T04:55:13+00:00Added an answer on May 24, 2026 at 4:55 am

    In this case I don’t think merely doing add: will suffice. You should link your Add button to a new action method, and in this action method you should create a Product object and a CommonData object, and then set the “common” of the former to be the latter. At least that’s what I would have done.

    In any case, I think that doing some “detection” of a new CommonData object would be way of an overkill in this case.

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

Sidebar

Related Questions

I'm using Core data in an iOS project. I have the data model setup
i need to set up a IS-A relationship with coredata. I have a Page
i have an application which uses CoreData/.sqlite to store my data, a tab bar
I have setup my first core data project. Everything works fine until I do
Setup: Tab Bar App First View is a ScrollView which has an ImageView as
I have the following setup: Main assembly that contains a WcfService and IWcfService contract.
I've got an app using CoreData as a data storage mechanism and the app
I have a UITabBarController. One of the tab shows application bookmarks, these bookmarks are
Setup: I installed Cygwin with the GNU programming lineup (gcc, g++, make, and gdb)
I setup a database & user along with grant permissions how I normally do

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.