Clarify naming of entity properties and fields

Created on 28 May 2014, about 11 years ago
Updated 11 July 2025, 24 days ago

Problem

Right now the entity system faces some inconsistencies in regard to naming. Content entities have fields, config entities have properties, but the storage layer tries to work with both.

For example, we have got EntityStorageInterface::loadByProperties() to load entities by field values.

Proposed resolution

Clarify the relationship of fields and properties, e.g. a field is an entity property with a fixed structure of field items lists, field items and field item properties.

Remaining tasks

* Agree on the path forward
* Clarify things on interface and method documentation, fix method names if necessary.

User interface changes

-

API changes

Depends on the solution.

πŸ“Œ Task
Status

Active

Version

11.0 πŸ”₯

Component

entity system

Created by

πŸ‡¦πŸ‡ΉAustria fago Vienna

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Would this still be a major?

  • πŸ‡¦πŸ‡ΉAustria fago Vienna

    I do think people already are used to this now.

    The way I'd see it a field is just a special kind of property, and with that the loadByProperties() method makes sense for fields also. However still, I think some people are confusing by loadByProperties() and do not think they can use it for fields also.

    That said, I do think it still makes sense to clarify this better and e.g. just add an alias loadByFieldValues() in ContentEntityStorage. But that will be up to the new entity maintainers to decide. So setting the right tag.

    I think major is ok, it's a quite important aspect still, so leaving the priority as it is.

Production build 0.71.5 2024