Start a new topic

Deeply nested offline relations with Titanium

I suspect this is related to this bug: [Offline Relational Data in Titanium](

My offline queries are not resolving nested relations, such as:


var promise = Kinvey.DataStore.get('event', eventID, {

offline: true,

relations: {

month: 'month',

'month.season': 'season'



`month.season` is not resolving. This works fine when `offline:false`.

Edit: I should note that I do have the workaround mentioned [here]( applied to my kinvey library, but the issue persists.

Have you tried removing the workaround (the commenting out of "delete options.relations") to see if that has any impact? We are definitely familiar with this workaround, and if I recall it does negatively impact nested relations. Slightly below the comment workaround for delete options.relations, you will see where it's checking the depth of the relations. Perhaps this workaround shouldn't be applied unless it's a top-level relation?
I'm actually using Mark's suggested workaround of cloning the options object instead of removing the `delete` but no I haven't tried taking it out.

Maybe like you say it shouldn't be applied to unless it is a top level relation, but I'm probably going to run into another issue as I have multiple relations, and only one of them has a sub-relation.
@adampax‌ can you post the debug output from this query? I tested this locally (using the regular HTML5 library) and can't reproduce the issue. I'm testing in my Titanium environment next, but a debug log could be helpful. Thanks!
@adampax‌ I'm unable to reproduce this issue in Titanium. Could you provide what version of Titanium and Kinvey's SDK you are using as well?
@Dave I'm using:

Ti SDK 3.4.0GA

Kinvey 1.1.8 with the modifications from [this issue](

Will post the debug.

Hey Adam,

Do you have the debug?
@Dave - just a thought to help reproduce, we only experienced this issue in the past when the results being returned were multiple records. Things resolve fine against one parent record, regardless of how many children are resolved or how deep it goes - but when dealing with multiple parent records only the first resolves fully, the rest do not.
@Caroline -- Hi, yes I will email them to indie support.

@Dave As @OhmzTech‌ mentioned, like with the [other bug](, multiple results need to be returned in order to see the issue. I suspect this is because, like with the other bug, recursion is deleting some of the argument properties before calling itself again.

@Dave are you able to replicate the [other bug]( and see what @Mark was seeing? Is @Mark still around?
FYI I emailed the debug logs to indie support on 11/5.
Login or Signup to post a comment