- 🇨🇦Canada travis-bradbury
I think this is a duplicate of #2822359: Support "entity" property definition in entity queries using Entity Reference Revisions fields → .
When an entity revision reference field is added to a fieldable entity, entity queries can add conditions on the referenced entity via the property "entity" like ->condition('field_reference.entity', 1)
. But when the entity revision reference is a base field of an entity (like the billing profile of a commerce order) the "entity" property is not working and queries like ->condition('billing_profile.entity', 1)
will return an error Drupal\Core\Entity\Query\QueryException: 'billing_profile' not found in Drupal\Core\Entity\Query\Sql\Tables->ensureEntityTable() (line 375 of core/lib/Drupal/Core/Entity/Query/Sql/Tables.php)
.
We encountered the error while debugging an search API index 🐛 Entity referenced by an entity revision base field does not update search index Closed: duplicate , it is unclear where the error and the solution resides.
commerce_order
moduleCurrent behaviour: an error is triggered
Expected behaviour: conditions can target billing profile fields.
Closed: duplicate
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
I think this is a duplicate of #2822359: Support "entity" property definition in entity queries using Entity Reference Revisions fields → .