草庐IT

JobAttribute

全部标签

php - 嵌套的 Symfony2 表单 : $options ['data' ] = null in nested form?

由于围绕这个主题的文档有些单薄,我走到了死胡同。我有两个模型:Job和JobAttribute。一个Job有很多JobAttributes,一个JobAttribute有一个Job:classJob{/***@ORM\OneToMany(targetEntity="JobAttribute",mappedBy="job_attributes")**@varArrayCollection*/private$attributes;}classJobAttribute{/***@ORM\Column(name="type",type="string",length=50)**@varstri