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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T17:32:22+00:00 2026-06-01T17:32:22+00:00

I have two entites: Folder and Picture . A Folder can have many Pictures

  • 0

I have two entites: Folder and Picture. A Folder can have many Pictures, and a Picture can belong to many Folders. However, there is one Folder called All, which holds all pictures belonging to any folder. So the Folder entity has a to-many relationship with Picture, so that each Folder has an NSSet of Pictures, and also each Picture has an NSSet of Folders. The All Folder contains all Pictures, but I don’t want any Picture to have the All Folder as one of their Folders.

Currently with the way my model is set up, if I add a Picture to the All Folder, the All Folder is automatically added to the Picture NSSet of Folders, which I don’t want. I think this happens because I have the two relationships as inverses of each other. But if I don’t select the inverse option, my Picture entities begin only supporting one Folder instead of many.

The question is: how can I model my entities so that A Folder can have many Pictures, and Pictures can have many Folders, but if I add a Picture to a Folder, it shouldn’t necessarily mean that that Folder is added to the Picture.

Here’s my current model:

Picture: 
Relationship: Folder
Destination: Folder
Inverse: Picture
Plural: To-Many Relationship

Folder:
Relationship: Picture
Destination: Picture
Inverse: Folder
Plural: To-Many 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-06-01T17:32:23+00:00Added an answer on June 1, 2026 at 5:32 pm

    Why do you need an All folder at all? Is “All” its own entity, or is it a Folder entity with some sort of All identifier?

    Either way, if you all you want is to grab all the pictures in any folder, you can do that pretty simply with a fetch request. No need to muck up your object graph with an extra entity or relationship.

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

Sidebar

Related Questions

I have two custom entites, Product and ProductType, linked together in many-to-one relationship. Product
I have two entities Group and Contact. A contact can belong to many groups,
i have two Entities, Parent and Child, that are linked through a bidirectional one-to-many
I have two entities, a User and Role with a one-to-many relationship from user
I have two entities. Groups. Pools. A Group can create many pools. So I
i have two entities named Parent and Child , linked in a one-to-many relationship.
I have two entities that usually have one-to-many relationship, but in rare cases should
I have two entities, Entity1 and Entity2, on a one to many relationship. On
I have two entities referenced one to many. When entity framework created the table
I have two entities one is Event and another is User. User can like

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.