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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:50:00+00:00 2026-05-28T07:50:00+00:00

i got into an issue with RKDynamicObjectMapping , however it could be that i

  • 0

i got into an issue with RKDynamicObjectMapping, however it could be
that i misuse it.

I have the following scenario

  1. request to the service to get areas
  2. choose area
  3. request to the service to get journals for selected area

data returned by both calls looks like that

{ d: [{cutID:""}, {cutID:""}, {cutID:""}] } 
{ d: [{journalID:""}, {journalID:""}, {journalID:""}] } 

i have the following code

RKObjectMapping* cutMapping = [RKObjectMapping mappingForClass:[Cut 
class]]; 
[cutMapping mapKeyPath:@"CutID" toAttribute:@"cutID"]; 
RKObjectMapping* journalMapping = [RKObjectMapping mappingForClass: 
[Journal class]]; 
[journalMapping mapKeyPath:@"journalID" toAttribute:@"journalID"]; 
RKDynamicObjectMapping * dynamicMapping  = [RKDynamicObjectMapping 
dynamicMapping]; 
[dynamicMapping setObjectMapping:journalMapping 
whenValueOfKeyPath:@"__metadata.type" isEqualTo:@"JournalDetails"]; 
[dynamicMapping setObjectMapping:cutMapping 
whenValueOfKeyPath:@"__metadata.type" isEqualTo:@"Cut"]; 
[[[RKObjectManager sharedManager] mappingProvider] 
setMapping:dynamicMapping forKeyPath:@"d"]; 

.... 

[objectManager loadObjectsAtResourcePath:getResourcePath 
delegate:self]; 

.... 

and later

[objectManager loadObjectsAtResourcePath:getResourcePath 
delegate:obj]; 

results of first request, which returns Cut objects, is mapped flawlessly, but not for second which returns Journal objects.
logging in request:didLoadResponse showed that service returns
expected json , so the issue is with mappings
how to make it work with two mappings ?

Anyone using RestKit Dynamic Mapping yet ?

  • 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-28T07:50:00+00:00Added an answer on May 28, 2026 at 7:50 am

    I presume you’ve checked that your Cut object is mapping to a to-many relationship in the CoreData entity?

    If so can you turn on the RESTKit logging and post the results

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

Sidebar

Related Questions

We've got into a very tricky scenario in a project. We have used lot
I have a table that got into the db_owner schema, and I need it
I'm running into an issue that's really baffling me. I have a container that
I've got the following issue with a actionscript3 project. I have a group of
I'm working on a framework and have run into an issue. I noticed that
Got a little issue where my client is pasting in content from Word into
I recently got into Java. I have a background in dynamic languages and I'm
Since the launch of .NET 4.0 a new term that has got into the
So I'm just going to dive into this issue... I've got a heavily used
I have just recently run into an issue running an asp.net web app under

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.