Entityreference One to One Relationship
Categories
Component ID
2880970
Component name
Entityreference One to One Relationship
Component type
module
Maintenance status
Development status
Component security advisory coverage
covered
Downloads
142
Component created
Component changed
Component body
This module is for validating one to one relationship with entity reference fields. For example: If you create a entity reference field in a content type say Article which is referencing content from Basic page and you have added a new Article referencing Basic page's content say "Test A". Then if you try to add a new article referencing the same content from Basic page which was "Test A" then it will throw and exception saying that "Your field name can only have one to one relationship, this basic page reference is already assigned to different article"
How to configure:
- Go to your Entity reference field settings page
- Check "Validate one to one entities" in "Additional behaviors" section
- You are good to go. Play around!
Known issue:
- As of now, this does not work with multi valued field selection.
Highlights:
- Works with all type of widgets
- Specific to respective content types
D8 Module Port: Already in progress.
