Merge pull request #55 from nibsirahsieu/m2m
support for Many to Many Relationships
This commit is contained in:
commit
b31445710f
|
@ -41,6 +41,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