A
A
Alexander Kosheverov2013-12-10 22:26:08
CMS
Alexander Kosheverov, 2013-12-10 22:26:08

Drupal many-to-many relationship

Actually, I am new to CMS drupal 7, and I have such 4 tables: recipe, ingredient, unit of measure and "occurrence".
If you write this on the databases familiar to me, then the links come out:
Recipe - entry (1:M)
Ingredient - entry (1:M)
Unit of measure - entry (1:M)
In addition to 3x id (not counting my own) in the "entry" table there is 1 more field: quantity.
Tell me, is it possible to implement such a structure with existing modules, or do I need to write my own?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
andead, 2013-12-11
@Iworb

Create material type "Recipe".
Create a dictionary "Ingredients".
Using the Field collection, create a composite field with the following fields:
- dictionary term "Ingredients" (term reference)
- quantity (integer)
- unit of measure (list)
Add the created composite field to the "Recipe" material type, make it multi-value.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question