Problem/Motivation
In the CRM project, each crm_relationship entity connects two contacts — a source and a target.
Currently, there is no way to limit how many relationships of a given type a contact may have.
In real-world use cases, many relationship types have natural limits. For example:
- A child usually has two parents.
- An employee has one primary employer.
- A student may have one advisor, but an advisor can have many students.
Without per-type relationship limits, data entry can produce logically invalid relationships (e.g., a child with five parents).
Site builders need a configurable way to restrict the number of relationships a contact can have per relationship type and per side (source or target).
Steps to reproduce
- Create a relationship type (e.g., Parent → Child).
- Add multiple Parent–Child relationships with the same child contact.
- Observe that there are no limits enforced — any number of parent relationships can be created.
Comments
Comment #2
bluegeek9 commentedComment #3
bluegeek9 commentedComment #6
bluegeek9 commented