ORMとしてsymfony1.4とPropelを使用しています。他のフォームを埋め込む必要のあるフォームがあります。もう1つの形式は、顧客とオブジェクトを接続するn:m関係です。顧客のすべてのオブジェクトを表示するように埋め込む方法がわかりません。
次のスキーマを考慮して、CustomerCountryGroupフォームをCustomerフォームに埋め込み、ユーザーに関連する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
この問題のチュートリアル/解決策をどこで見つけることができるか知っていますか?
どうもありがとう