1

When defining an entity (using e.g. Drupal console) some fields are created in the entity, these fields are stored in the entity-table. Afterwards you can add fields to an entity, these fields are stored in separate tables. I see that in the entity-source you can add fields later on.

What is the difference between 'internal' fields and 'external' fields??

1

The 'internal' fields are base fields, defined in the entity type definition. The 'external' fields are bundle fields, defined in configuration, which can be exported and imported to yaml, and is configurable in UI.

Content entities that have no bundles can have bundle fields, for example the user entity. In this case the id of the bundle is that of the entity.

More information https://www.drupal.org/docs/8/api/entity-api/introduction-to-entity-api-in-drupal-8, especially this chapter https://www.drupal.org/docs/8/api/entity-api/defining-and-using-content-entity-field-definitions.

  • Thanks. The Entity system is a big system with a lot of possibilities, but it is still continuously evaluating. One will have to 'grow' into it, and trust the future – Bart van Leeuwen Jun 8 '17 at 19:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.