Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #55 from nibsirahsieu/m2m

support for Many to Many Relationships
  • Loading branch information...
commit b31445710f77d9ffccd9d1673e621176abd957d4 2 parents 7beb193 + 013d55d
@willdurand willdurand authored
Showing with 7 additions and 0 deletions.
  1. +7 −0 Form/PropelTypeGuesser.php
View
7 Form/PropelTypeGuesser.php
@@ -41,6 +41,13 @@ public function guessType($class, $property)
'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);
+ }
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.