Say I have two classes defined as:
class Feed : RealmObject {
var episodes: RealmList<Episode> = realmListOf()
}
class Episode : RealmObject {
var feed: Feed? = null
}
And there is a Feed object feed, and a bunch of Episode objects episode1, episode2, … which are added to list episodes. These are unmanaged objects copied from realm and later modified.
Then say I want to upsert episode1, I do:
realm.write {
copyToRealm(episode1, UpdatePolicy.ALL)
}
So from what I understand from the documentation, it will also update the relationship feed, but then is it also going to update the relationships of feed, i.e. epiosdes? Does it go through the update process like:
episode1 -> feed -> (episode1 -> feed -> ...), (episode2 -> feed -> ...), (episode3 -> feed -> ...) ...
I presume it doesn’t go through the infinite loop, but to what extent does the update process go? Does the updating of episode1 result in the updating of all episodes through the relations?
Please help explain.