Start a new topic

KCSLinkedAppdataStore error


I have faced with the following issue trying to query data using KCSLinkedAppdataStore:

iOS app uses the following code to query data from Kinvey backend:

KCSLinkedAppdataStore *topicStore = [KCSLinkedAppdataStore storeWithOptions:@{KCSStoreKeyCollectionName : @"Topic", KCSStoreKeyCollectionTemplateClass : [KiTopic class]}];
KCSQuery* sessionTopicsQury = [KCSQuery queryOnField:KCSEntityKeyId usingConditional:kKCSIn forValue:activeTopics];
[topicStore queryWithQuery:sessionTopicsQury withCompletionBlock:^(NSArray *objectsOrNil, NSError *errorOrNil) {


the collection Topic has a link to collection TopicTeam using the field “topicTeams”. This relation is defined in KiTopic class:

+ (NSDictionary *)kinveyPropertyToCollectionMapping
 return @{@"topicTeams" /* backend field name */ : @"TopicTeam" /* collection name */};

As I can see in the Kinvey backend the link exists in the collection:

 "_collection": "TopicTeam",
 "_id": "57f516b3927c4f9c6a7f6eee",
 "_type": "KinveyRef"

The data returned using the code above contains correct Topic entries. But Topic’s have incorrect linked TopicTeam objects. TopicTeam objects have entityID’s but all other fields are empty (nil).

Could you please help to solve this issue?

1 Comment


Can you share the definition of your "KiTopic” class?

Also take a look at the “StatusShareUpdate” class of the StatusShare sample project. 



Kinvey Support

Login or Signup to post a comment