1
我使用symfony 1.4和Propel作为ORM。我有一个需要在其中嵌入其他表单的表单。另一种形式是连接客户和某个对象的n:m关系。我找不到如何嵌入它,以便显示客户的所有对象。Symfony嵌入式表格 - 多对多关系
考虑到以下模式,我想在Customer窗体中嵌入CustomerCountryGroup窗体,以显示与用户相关的CuountryGroup对象列表。
这里是我的schema.yml:
Customer:
_attributes: { phpName: Customer }
id:
phpName: Id
type: INTEGER
size: '11'
primaryKey: true
autoIncrement: true
required: true
CustomerCountryGroup:
_attributes: { phpName: CustomerCountryGroup }
id:
phpName: Id
type: INTEGER
size: '10'
primaryKey: true
autoIncrement: true
required: true
customerId:
phpName: CustomerId
type: INTEGER
size: '10'
required: false
foreignTable: Customers
foreignReference: id
onDelete: CASCADE
onUpdate: RESTRICT
countryGroupId:
phpName: CountryGroupId
type: INTEGER
size: '10'
required: false
foreignTable: CountryGroups
foreignReference: id
onDelete: CASCADE
onUpdate: RESTRICT
CountryGroup:
_attributes: { phpName: CountryGroup }
id:
phpName: Id
type: INTEGER
size: '11'
primaryKey: true
autoIncrement: true
required: true
你知道我在哪里可以找到这个问题的一些教程/解决方案?
非常感谢