Post

Replies

Boosts

Views

Activity

SwiftData Relationships
I like knowing what I'm looking at in my code, so I'd like to know explicitly that the SwiftData variable that is the inverse is "decorated" with the @Relationship macro also, so: Can I use the @Relationship macro on the inverse class of a relationship if I don't specify it with .inverse ? IE: From Company @Relationship(deleteRule: .nullify, inverse: \Address.company) var addresses: [Address]? and set the other as: From Address @Relationship var company: Company?
1
0
300
Jul ’24