How do I create a inverse relationship in SwiftData to the same model class?

268 views Asked by At

How do I create an inverse relationship that is required for CloudKit when the model has a reference to other objects of the same model? As an example I have an employee that is of type Person who has a relationship to another employee who is a boss and a relationship from a boss to his team who is also of type Person. It works locally without the inverse being defined.

0

There are 0 answers