Merge pull request #55 from nibsirahsieu/m2m

support for Many to Many Relationships
This commit is contained in:
William DURAND 2011-09-28 15:38:13 -07:00
commit b31445710f

View file

@ -41,6 +41,13 @@ class PropelTypeGuesser implements FormTypeGuesserInterface
'multiple' => \RelationMap::MANY_TO_ONE === $relation->getType() ? false : true,
), 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);
}
}
}