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

The Archive Base Latest Questions

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

I want to have this model : Feature -> Image (relationship name: image inverse:

  • 0

I want to have this model :

Feature -> Image (relationship name: image inverse: feature)
Feature -> Image (relationship name: thumb inverse: feature)

Image -> Feature (relationship name: feature inverse: ????)

I can setup only one inverse. But it looks that i need both: image and thumb

UPDATE

One of the way is to create this model:

Picture has all that we need from Image
Image inherit picture
Thumb inherit picture

they share NSManagedObject Class.

Is this correct?

UPDATE 2

After @StuDev help my model looks like.

Model version 2.0

Thanks.

  • 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-25T14:46:09+00:00Added an answer on May 25, 2026 at 2:46 pm

    I would recommend setting up a model that looks something like this:

    Multiple entity sample core data model

    So using your notation:

    Feature -> Image (destination: Image, inverse: feature)
    Feature -> Thumb (destination: Thumb, inverse: feature)
    

    Or, the other way around (the same thing really):

    Image -> Feature (destination: Feature, inverse: image)
    Thumb -> Feature (destination: Feature, inverse: thumb)
    

    This way you keep access to your thumb and image separate, so you only need to load the one you need at that time. You shouldn’t have a need to store the image and thumb within the same entity (correct me if I’m wrong…), so this setup keeps things nice and clear.

    EDIT

    Alternatively, if you would like to keep the image and thumb within the same NSManagedObject subclass (as you suggest in your update), then combine these as attributes within an entity “Picture” (or whatever you want to call it):

    Single entity sample core data model

    Using this approach, when you want to access either the image or thumbnail of a given feature, simply fault to the feature’s picture, and then access the image or thumb:

    UIImage *theThumbnail = [feature.picture thumb];  // Assuming you are storing the image & thumb as a transformable (UIImage) type
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this query statement and want to only get records that has a
i have two Activity in this i take pixels of image from one activity
I have this HTML structure and want to convert it to an accordion. <div
I have this code: myVariable which I want to change into trace(myVariable: + myVariable);
I have this situation where I want to display a list of Administration objects
I have this html code that i want to edit with jQuery. Here is
I have this string: comment_1234 I want to extract the 1234 from the string.
I have this code that I want to make point-free; (\k t -> chr
I have this mysql tables I want to display with jqgrid. The problem appears
I have this algorithm that I want to implement on VB6. Sub Main() dim

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.