I have a little Problem with Doctrine and Yaml:
Here is my Model:
Keyword:
columns:
word: { type: string, notnull: true }
is_stopword: { type: boolean, default: 0 }
has_parents: { type: boolean, default: 0 }
Relation:
columns:
child: { type: integer, notnull: true }
parent: { type: integer, notnull: true }
relations:
Keyword: { onDelete: CASCADE, local: [child, parent], foreign: id }
Somehow, i can’t get Doctrine to bind both relations, only the first one (child) gets connected to “Keyword”… Since a Child can have many Parents, and a Parent many Childs, this is the only way i see to solve this… Any tipps?
You have to define two relations, one for parent and one for child.
This
local: [child, parent]won’t work, for each relation you have to define one local and one foreign field.