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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T14:21:27+00:00 2026-06-07T14:21:27+00:00

As a following question to the solved issue with the object mapping I’ve upgraded

  • 0

As a following question to the solved issue with the object mapping I’ve upgraded RestKit to 0.10.1 and extended the data model to the following.

A company can have multiple contacts and activities, a contact can have multiple activities but only one company, an activity can only have one company and one contact.

Entities with Relationships

 Company 
 - unitID 
 - companyID
 - matchcode
 - contacts* (Company -->> Contact | 1:n)
 - activities* (Company -->> Activity | 1:n)

 Contact
 - unitID
 - companyID
 - contactID
 - lastName
 - firstName
 - company* (Contact >--> Company | 1:1)
 - activities* (Contact -->> Activity | 1:n)

 Activity
 - unitID
 - activityID
 - companyID
 - contactID
 - subject
 - account* (Activity >--> Company | 1:1)
 - contact* (Activity >--> Contact | 1:1)

JSON (Company)

 [
   {
      "unitID":"003CABD8DEB5DC13C",
      "companyID":"BSP-002999",
      "matchcode":"Testcompany"
   }
 ]

JSON (Contact)

 [
   {
      "unitID":"DAC2ACCC125795D00",
      "companyID":"BSP-002999",
      "contactID":"CLP-015468",
      "firstName":"Mister",
      "lastName":"Wayne"
   }
 ]

JSON (Activity)

 [
   {
      "unitID":"E123FlADAS2DASD2F",
      "activityID":"ACT-123912",
      "companyID":"BSP-002999",
      "contactID":"CLP-015468",
      "subject":"Testsubject",
   }
 ]

Object Mapping – Setting up the connections

 // Objects
 companyMapping.primaryKeyAttribute = @"companyID";
 ...
 contactMapping.primaryKeyAttribute = @"contactID";
 ...
 activityMapping.primaryKeyAttribute = @"activityID";

 // Connections
 [contactMapping mapRelationship:@"company" withMapping:companyMapping];
 [contactMapping connectRelationship:@"company" withObjectForPrimaryKeyAttribute:@"companyID"];

 [activityMapping mapRelationship:@"company" withMapping:companyMapping];
 [activityMapping connectRelationship:@"company" withObjectForPrimaryKeyAttribute:@"companyID"];

 [activityMapping mapRelationship:@"contact" withMapping:contactMapping];
 [activityMapping connectRelationship:@"contact" withObjectForPrimaryKeyAttribute:@"contactID"];

Problem

The first two mapping operations work like they should but somehow the last mapping activity >–> contact doesn’t work.

No connection for contact

Thanks for any ideas to solve it!

  • 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-07T14:21:29+00:00Added an answer on June 7, 2026 at 2:21 pm

    Solved the problem on my own because there was an error in the configuration of Core Data.

    The relationship Contact –>> Activity wasn’t set to “optional” and Xcode and RestKit didn’t show a clear error. Setting it to “optional” solved the problem and the mapping works for all relationships.

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

Sidebar

Related Questions

I have following question on adobe omniture How we can register an iPhone app
I have the following question. How can I print an output file line by
I have the following question. I have a set of Fortran90 source files, most
I have the following question, and it screams at me for a solution with
Question 1: (Solved) I'm facing an issue with class loader in Weblogic. I've a
I asked yesterday a question about css div positioning, now I solved my issue
Following up on this question , it seems that the duplicate issue could be
I am trying to solve the following question : A sequence in which the
I am trying to solve the following question which was part of a programming
The following question is not a typical programming question, but IMHO programmers are affected

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.