0

これを行う方法:

$formMapper->add('propertyA.propertyB');

いつ

$this->propertyA->propertyB;

/**
* @ORM\ManyToOne(targetEntity="propertyB")
*/
protected $propertyA;

$propyA はエンティティ A に依存します

$propertyB はエンティティ B に依存します

4

1 に答える 1

1

これをするだけ

->add('name', 'text', array('property_path' => 'propertyA.propertyB', 'required' => false))
于 2013-02-13T13:10:54.150 に答える