Commerce added a CommerceEntityViewsData handler in version 2.15 which works around many core bugs which affect custom entity types:

1) Contains special handling for the following base field types: datetime, list_float, list_integer, list_string. Workaround for core issue #2337515: Allow @FieldType to customize views data.

2) Provides views data for bundle plugin fields, as a workaround for core issue #2898635: bundleFieldDefinitions() are not added in EntityViewsData.

3) Provides the missing delta field for multi-value fields, as a workaround for core issue #3097568: EntityViewsData does not generate a "additional fields" nor "delta" field for multivalue base fields.

4) Fixes handling of fields with multiple properties, as a workaround for core issue #3097636: EntityViewsData::mapSingleFieldViewsData() should not use the "field" handler for every field property.

5) Provides reverse relationships for base entity_reference fields, as a workaround for core issue #2706431: provide Views reverse relationships automatically for entity base fields.

All of this makes sense outside of Commerce as well, so let's move it up a level.

CommentFileSizeAuthor
#2 3116128-2-entity-views-data.patch18.89 KBbojanz

Comments

bojanz created an issue. See original summary.

bojanz’s picture

Status: Active » Needs review
StatusFileSize
new18.89 KB

Here we go.

  • bojanz committed 26aa632 on 8.x-1.x
    Issue #3116128 by bojanz: Add an EntityViewsData handler for improved...
bojanz’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.