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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T21:14:47+00:00 2026-05-17T21:14:47+00:00

My application is CoreData based but they may be a common theory for all

  • 0

My application is CoreData based but they may be a common theory for all relational databases:

I have a Output-Input to-many relationship in my model. There are potentially an unlimited number of links under this relationship for each entity. What is the best way to identify a specific input or output?

The only way I have achieved this so far is to place an intermediate entity in the relationship that can hold an output and input name. Then an entity can cycle through its inputs/outputs to find the right relationship when required. Is there a better way?

Effectively I am trying to provide a generic entity that can have any number of relationships with other generic entity.

Apologies if my description isn’t the clearest.

Edit in response to the answer below:
Firstly thank you for your response. I certainly have a two-way too-many relationship in mind. But if a widget has 2 other widgets linked to its Inputs relationship what is the best way of determining which input is supplying, say, ‘Age’ or ‘Years Service’ when both may have this property but I’m only interested in a specific value from each?

  • 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-17T21:14:48+00:00Added an answer on May 17, 2026 at 9:14 pm

    I’m as confused as Joshua – which tells me that it may be that you haven’t got a clear picture of what you’re trying to achieve or that it is somewhat complex (both?).

    My best guess is that you have something like:

    Entity Widget
    Attributes:

    • identifier

    Relationships

    • outputWidgets <<->> Widget
    • inputWidgets <<->> Widget

    (where as per standard a ->> is a to-many relationship and <<->> is a to-many relationship with a to-many reverse relationship).

    So each widget will be storing the set of widgets that it has as outputs and the set of widgets it has as inputs.

    Thus a specific widget maintains a set of inputWidgets and outputWidgets. Each of these relationships is also reversed so you can – for any of the widgets in the input or output – see that your widget is in their list of inputs or outputs.

    This is bloody ugly though.

    I think your question is how to achieve the above while labelling a relationship. You mention you want to have a string identifier (unique?) for each relationship.

    You could do this via:

    screengrab

    Where you create a new widgetNamedRelationship for each double sided relationship. Note that I’m assuming that every relationship is double sided.

    Then for each widget you have a set of named inputs and named outputs. This also allows for widgets to be attached to themselves but only of there are separate input and output busses.

    So then for your example “age” in your implementation class for Widget instance called aWidget you’d have something like:

    NSPredicate *agePredicate = [NSPredicate predicateWithFormat:@”name=’age'”];
    NSSet *ageInputs = [aWidget.inputs filteredSetUsingPredicate:agePredicate];

    Have I understood the question?

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

Sidebar

Related Questions

I have a Core Data based mac application that is working perfectly well until
I have an application that uses CoreData. I previously had a class named Marker
I have an application in XCode using the sqlite/coredata database and that has already
Can people give me examples of why they would use coreData in an application?
I have a plain XCode CoreData enabled iPhone/iPad navigation application. In this I have
I have a navigation based application using Core Data and several levels of drill-down
I'm a nwebie in Core Data, i have designed a navigation based application and
Environment: xcode 3.2.1, document-based core-data application. I have a document-based cocoa app which uses
I am making a document based application using CoreData. I can create a new
I have a non document-based Core Data application. There's an NSTreeController that manages a

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.