- πΊπΈUnited States JonMcL Brooklyn, NY
Yes, please!
Works well for us to chain through two entity reference fields.
It is possible to add a chain of entity references to a query access condition, e.g.:
$conditions->addCondition('field_mammals.entity:mammal.field_primates.entity:primate.field_title.value', 'Gorilla')
This works with everywhere Entity Queries are used, like in JSONAPI.
Views however builds queries in it's own way, and chained conditions will actually break the view.
Create a query_access handler with a chained condition and a view to implement it.
Fix ViewsQueryAlter::mapConditions to also map the conditions when there is a chained entity reference.
Write a test to prove this works with:
- Base fields with cardinality 1
- Base fields with cardinality -1
- Config fields
- Multiple levels of chaining.
Needs review
1.0
Views integration
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Yes, please!
Works well for us to chain through two entity reference fields.