ZF2 Form Hydration with multiple objects and fieldsets
问题 I'm struggling trying to work out how to edit multiple models with a single form. I have a database table called Teams and a doctrine entity associated with this table. I create a form as below: My team fieldset: class TeamFieldset extends AbstractFieldset implements InputFilterProviderInterface { public function init() { $this->setName('Team') ->setHydrator(new DoctrineHydrator($this->getObjectManager(),'Application\Model\Entities\Team')) ->setObject(new Team()) ->setLabel('Team'); $this-