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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T04:37:09+00:00 2026-05-16T04:37:09+00:00

I have entity Unit and Tag , each with to-many relation to other. I

  • 0

I have entity Unit and Tag, each with to-many relation to other.

I am using NSFetchedResultsController to manage the data. What I need is to return distinct Unit object into NSFetchedResultsController for condition Tag.show == YES. I’m not sure how to feed all this to NSFetchedResultsController. Set entity to Unit or Tag, how to build predicate for it.

Example:

I have 6 Tag objects tag1...tag6 and 3 Unit object unit1, unit2, unit3.
tag1, tag2 are pointing to unit1, tag3, tag4 to unit2.
tag1…tag4 met show == YES condition.
So I want finally to get uni1 and unit2 into NSFetchedResultsController.

  • 1 1 Answer
  • 1 View
  • 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-16T04:37:10+00:00Added an answer on May 16, 2026 at 4:37 am

    Do a fetch on the Unit entity with a predicate of "ANY Tag.show==YES".

    That will return any Unit instances that has one or more related Tag instances with show==YES. Fetches return distinct objects so you don’t have to do anything else.

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

Sidebar

Related Questions

i have an entity Entity1 that have one to many relation with Entity2 as
I have an application that contains methods that work with data using Entity Framework
I have an Entity. Mandate . Every mandate has a required:many relation to a
I have a EF entity retrieved and bound to some UI controls using Unit
I have entity model like this (using EclipseLink and JPA 2.0): @Entity class A
I have entity e.g. Product which aggregates other entities such as Category . Those
I used JPA and mysql. Each table have entity class.I have four tables. Table1
I have an Entity which holds a collection of OtherEntity in a many-to-many style
Suppose you have a method: public void Save(Entity data) { this.repositoryIocInstance.EntitySave(data); } Would you
I have a generic repository that is using Entity Framework 4 with the DbContext

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.