Does flexible sync pull objects across relationships like Lists, LinkingObjects, or direct relationships? Assuming this basic schema:
class Person: Object {
@Persisted(primaryKey: true) var _id = UUID().uuidString
@Persisted var shirts: List<Shirt>
@Persisted(originProperty: "owner") var pants: LinkingObjects<Pants>
}
class Pants: Object {
@Persisted(primaryKey: true) var _id = UUID().uuidString
@Persisted var owner: Person?
}
class Shirt: Object {
@Persisted(primaryKey: true) var _id = UUID().uuidString
}
Would this query sync Pants and Shirts?
try await subscriptions.update {
let sub = QuerySubscription<Person>(name: "subscription")
subscriptions.append(sub)
}
Would this query sync Persons?
try await subscriptions.update {
let sub = QuerySubscription<Pants>(name: "subscription")
subscriptions.append(sub)
}