I'm using symfony 1.4 and Propel as ORM. I have a form that needs to embed some other form in it. The other form is n:m relation that connects customer and some object. I can't find out how to embed it so that it displays all the objects for a customer.
Considering the following schema, I want to embed CustomerCountryGroup form in Customer form to display a list of CuountryGroup objects related to a user.
Here is my 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
Do you know where I can find some tutorial/solution of this problem?
Many thanks