I have been experimenting with this, but am struggling see consistent behavior.
Context
I have 3 CPTs configured in a many-to-many Post Relationship: People, Relations (for recommendations), Books.
Relations has two parents: People & Books.
Simple Configuration (my site is very similar to the Bands, Events, Appearances example): Person Pages shows recommended Books, Book pages show People that have recommended them).
I have read through any many-to-many related documentation pages I could find:
- https://toolset.com/documentation/user-guides/displaying-fields-of-parent-pages/
- https://toolset.com/documentation/beyond-the-basics/post-relationship-concepts/implementing-many-to-many-relationships/
- https://toolset.com/documentation/user-guides/many-to-many-post-relationship/
Question
The Parents CPTs, People and Books, generate the relations-XXX posts when relationships are created.
If one of the the Parent CPT Posts are deleted, are the corresponding Relations Posts deleted? If not, are "orphaned" relations posts caused... which can cause problems with Views?
For example if Person Post: John Doe "recommends (post relationship with Relations Post: relations-XXX) Book Post: The Lord of the Rings... and John Doe or The Lord of the Rings are deleted... if the "relation-xxx" post is NOT deleted... an erroneous link to could exist.
Hopefully this makes sense.
No Post is deleted but the one you delete.
This means, if you delete any of the posts in such a tri-relation, the other 2 stay.
In Views Loops you will check upon the existence of the Parent, to avoid wrong links:
https://toolset.com/documentation/user-guides/conditional-html-output-in-views/
You will check if the parent Post Field is not empty, and that avoids outputting empty data.