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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:57:03+00:00 2026-05-26T14:57:03+00:00

I’m a long time listener, but first time caller here… Hoping you can help

  • 0

I’m a long time listener, but first time caller here… Hoping you can help me with a core data question!

I am creating a custom business app for iPad that allows a user to fill out contracts commonly used in their business. There are four contracts with between 20 and 40 data fields each and they are all quite different, but there are a few (3-4) fields that are common to all four, such as Date Created and Vendor Name etc.

I need to display all the contracts together in a UITableView (grouped style to show there are different types), and I need to be able to select a cell and display a detail view so the user can view and modify data on a specific contract.

My research to date tells me I should use a parent entity (entity A) that lists the attributes common to all, and then child entities (entity B, C, D, & E representing each of the four contracts) that have the attributes unique to them, and inherit the rest from entity A.

Is this the best way to structure this data model? Bearing in mind that when I create a new instance of a contract it needs to be a standalone object with all its attributes plus that of the parent. If so, when I’m generating cells for my tableView, do I fetch entity A and hope the rest come along also, or do I do separate fetch requests for each contract type and add to the table that way? Conversely, if I want to create a new instance of a contract (say entity B in my data model) how would I go about that?

I hope I’ve explained that well enough. Thanks for your help with this!

  • 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-26T14:57:03+00:00Added an answer on May 26, 2026 at 2:57 pm

    You should create an abstract entity with your common fields, and inherit your different contract types from there. From the documentation:

    In a model, entities may be arranged in an inheritance hierarchy, and entities may be specified as abstract.

    This will also enable you to define common behaviours for all your contracts and use the abstract superclass in your code to refer to any contract.

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

Sidebar

Related Questions

Long time listener, first time caller here. Ok, I apologize for the length of
As they say on the radio - long time listener first time caller.... Here's
Hey Overflow. Long time listener, first time caller. So here's what I've got: I'm
long time listener. First time caller... Not strictly a PHP question as it involves
Hey, long time listener first time caller, and I'm asking a question related to
Long time listener, first time caller. I'm a 6 month old dev from Code
I've been a long time browser here, but never have had a question that
long time listener first time caller... I have this function (I don;t recall where
Long time listener, first time caller... In Access 2007 I have a column named
Long-time listener, first-time caller. I'm relatively new to XPath and looked at several other

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.