- Issue created by @bluegeek9
- πΊπΈUnited States jdleonard Austin, TX, USA
I'm totally here to make things difficult...
Let's say I want to create a view that shows a Contact's siblings. This is straightforward if the Contact has a Relationship from that Contact to each sibling Contact. It is much less straightforward if the siblings might be referenced on Relationships from the Contact and/or on Relationships to the Contact.
Queries would be much simpler if all Relationships were one-way.
Would it make sense for a symmetrical relationships to be represented as two one-way relationships (possibly referencing each other)?
I realize I'm posting this on an issue about asymmetrical relationships...
- πΊπΈUnited States bluegeek9
This issue concerns relationship types. This simplifies the relationship type form but doesn't change the schema of relationship entities.
I don't think making relationships one way will simplify things. There would be significant duplicate data. Additionally, the labels, relationship type, and contact are not on the relationship entity. The labels are on the relationship type and contact entity.
There is a service to return the relationships for a contact. There will need to be custom view fields, filter plugins.
Civi simplifies the query using a cache table with two entries for each relationship. Drupal offers caching mechanisms. If necessary, we could create a table with three columns that the relationship service can use.
tldr;
Premature optimization is the root of all bugs. - Merge request !37Resolve #3526429 "Relationship type asymmetrical" β (Merged) created by bluegeek9
-
bluegeek9 β
committed f6f3c7e4 on 1.0.x
Resolve #3526429 "Relationship type asymmetrical"
-
bluegeek9 β
committed f6f3c7e4 on 1.0.x