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

  • Home
  • SEARCH
  • 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 3596854
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T20:02:34+00:00 2026-05-18T20:02:34+00:00

I have two entities: match and player , which I have set up with

  • 0

I have two entities: match and player , which I have set up with an intermediate table matchplayer as players can play multiple matches, and matches will have multiple players. I have views where I can add, amend and delete both matches and players separately, but I am confused about how to populate the matchplayer entity. I have set up the matchplayer entity with no attributes but with relationships to both the match and player entities.

I have a view managing match details, and from there it loads a tableview of all players where I can select the players I want to ‘connect’ to the match. But that’s where I get stuck. What do I add to the matchplayer entity to store the relationship?

  • 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-18T20:02:34+00:00Added an answer on May 18, 2026 at 8:02 pm

    you don’t need to create a separate entity just to maintain relationship.
    What you can do is you maintain to many relationship from match entity to player entity.
    Suppose name that relationship as playerInMatch. Now each managedObjectContext of match that you insert in match entity, you can insert multiple players to this managedObjectContext using addPlayerInMatch: method (i.e the accessor method that automatically gets generated when you created modal classes).
    Now during retrival of a particular match , you can retrive a complete set of players of that match through its relationship.Using that you can delete or add any player to that set if you want to.
    (I have briefly explained you the idea hoping you have a clear understanding of using core data relationship.If you are not perfectly clear with core data check out following tutorial:
    http://cocoadevcentral.com/articles/000085.php

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

Sidebar

Related Questions

I have two entities: match and player , which I have set up with
i have two entities one called User and another called Membership which has a
Let's say I have two entities: Physician Credentials And a physician can have many
I can't see why this isn't working. I have two entities, let's call them
I have two entities named Category and Article which have a many to many
I have two entities Foo and Bar with a Many to Many relationship between
I have two entities, each from a different database and therefore different edmx files.
I have two entities, Entity1 and Entity2, on a one to many relationship. On
I have two tables Group and Customer and of course two entities Group and
I have a situation where I have two entities that share a primary key

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.