Search code examples
iossimperium

Does Simperium support 1-many relationships where the parent and child are of the same type?


Right now, I have the following:

First

Does Simperium support this kind of relationship?

EDIT: I guess I'm wondering if relating entities in this way would impact performance. Thanks!


Solution

  • Though there isn't a unit test for this, it should be fine. The handling of self-referential relationships shouldn't be any different than the handling of one-to-many relationships between two different Entities. For example, Simperium will resolve relationships if they sync out-of-order.

    Behind the scenes, it's just unique IDs that Simperium is tracking and syncing.