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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:08:51+00:00 2026-05-25T00:08:51+00:00

How do I implement cross-model fetched properties in a core data model? Simply put,

  • 0

How do I implement cross-model fetched properties in a core data model? Simply put, let’s say I have two models — a CompanyStructure model that describes departmental hierarchy, and a Employee model that describes all employees. How would I set an employee’s department as a fetched property?

I found a similar question asked here. It’s a good description of the problem I’m facing:

When I setup a fetched property for state in my document entity (in
Xcode modeller) it needs the destination set – however, the
destination popup only shows entities in the current model. What I
want (I think) is a predicate something like:

State.id == $FETCH_SOURCE.state_id

in order to relate the document entity to the globally defined state
entity in the other model.

BTW, I don’t know about $FETCH_SOURCE or $FETCH_ANYTHING_ELSE, so I don’t really understand the code block in the quoted segment above. I do know that I can’t set the entity for an employee’s department fetched property because they’re in separate models.

EDIT — Merging the two data models into one is not an option.

  • 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-25T00:08:52+00:00Added an answer on May 25, 2026 at 12:08 am

    Fetched properties are part of the model, so by definition they are not cross-model. If you want to refer to more than one model you have to do it in code. Also, the definition of the connection between the Employees and Departments can only be done within a model, unless you use your own UIDs and thus bypass the model metaphor.

    They way I do similar tasks, I add additional .h and .m files to my classes, like ClassName+Additions.h and I declare “properties” as methods that can be called just like properties such as [smith department]. In these files, I can #include all the necessary classes from the other model and maintain separate managed object contexts.

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

Sidebar

Related Questions

I have been asked to implement a cross site login solution in Zend Framework.
How can I implement cross browser opacity gradient (not color gradient)? See following code:
I'm trying to implement a Visual Studio Addin to support cross-platform development. The addon
To implement data access code in our application we need some framework to wrap
I'm trying to implement a data compression idea I've had, and since I'm imagining
Some time in the near future I will need to implement a cross-language word
ist it possible to do a 10-fold cross-validation with svmmulticlass or do I have
First let me say, I am not a coder but I help manage a
we have this application which uses cross app domain (2 app domains in the
I have a C++ application cross-compiled for Linux running on an ARM CortexA9 processor

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.