0

这该怎么做:

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

什么时候

$this->propertyA->propertyB;

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

$propertyA 依赖于实体 A

$propertyB 依赖于实体 B

4

1 回答 1

1

就这样做

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