Path: blob/main/release-content/release-notes/allow_self_relationships.md
9311 views
------Relationships can now optionally point to their own entity by setting the allow_self_referential attribute on the #[relationship] macro.
By default pointing a relationship to its own entity will log a warning and remove the component. However, self-referential relationships are semantically valid in many cases: Likes(self), EmployedBy(self), TalkingTo(self), Healing(self), and many more.
Usage
To allow a relationship to point to its own entity, add the allow_self_referential attribute:
Now entities can have relationships that point to themselves: