1

I'm wondering how to describe, or add extra information to a Entity Reference relationship between two content types.

I have 'event' and 'people' content types. An event can have many people, and each person can be an either an organizer, presenter, facilitator, etc.

How can I model this relationship? Do I need to have an Entity Reference field for each type of relationship, or can I add the type of relationship as a parameter of a single Entity Reference?

Thanks!

1 Answer 1

1

If you want to stick with Entity Reference, you'll need to have a field for each type of relationship. ER relationships don't have the capacity for meta data.

If you can change, check out the Relation module.

Relation is an API module and storage model for both simple and the most complex relations between entities. The module can handle both directional and symmetrical relations very well.

Relations are entities and can therefore have fields. This makes Relation the most flexible and powerful relation model out there. (Still, using Relation with anything but the default SQL storage will not work in most cases.)

(emphasis mine). You could, for example, attach a field to the relation entity type, that linked to a vocabulary containing the event role.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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