1

I'm trying to build a system where I have people, departments and facilities but they must link through a triple join table.

Basically, a person can belong to multiple departments OR can work multiple locations, but a department can be at multiple facilities (imagine a sub company with multiple locations at different buildings).

I'm wondering what is the best approach to build this in Drupal. Should I use a custom entity to tie these content types together?

I tried using Entity Reference but it doesn't seem to solve my problems as I was hoping for. I thought about creating another content type for Person-Location-Department but I was thinking on having these relationship get generated on the fly when creating a person.

Entities schema

2
  • You could try Relation. The relationships themselves are entities and can have fields attached
    – Clive
    Commented Jun 1, 2013 at 11:13
  • I just tried relations, and while it could work the UI doesn't seem to be very intuitive. Even after using relation_select
    – IvanSF
    Commented Jun 3, 2013 at 15:40

0

Your Answer

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

Browse other questions tagged or ask your own question.