support for Many to Many Relationships
This commit is contained in:
parent
7fb0de3574
commit
3af3fb4cf8
|
@ -33,6 +33,13 @@ class PropelTypeGuesser implements FormTypeGuesserInterface
|
||||||
'multiple' => \RelationMap::MANY_TO_ONE === $relation->getType() ? false : true,
|
'multiple' => \RelationMap::MANY_TO_ONE === $relation->getType() ? false : true,
|
||||||
), Guess::HIGH_CONFIDENCE);
|
), Guess::HIGH_CONFIDENCE);
|
||||||
}
|
}
|
||||||
|
} elseif ($relation->getType() == \RelationMap::MANY_TO_MANY) {
|
||||||
|
if (strtolower($property) == strtolower($relation->getPluralName())) {
|
||||||
|
return new TypeGuess('model', array(
|
||||||
|
'class' => $relation->getLocalTable()->getClassName(),
|
||||||
|
'multiple' => true,
|
||||||
|
), Guess::HIGH_CONFIDENCE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue