For those who may have missed it too - don't define an id column for the relation table (ArticleCategoryRelation in my example) and you'll get the N:M stuff in your forms.
Regards, Rytis On Sun, Feb 15, 2009 at 10:56 PM, Rytis Daugirdas <rytis.daugir...@gmail.com > wrote: > Hello, > > Does symfony handle N - M relationships in any way? For example: > > Category: > tableName: pp_category > columns: > id: > name: { type: varchar(255), required: true } > > Article: > tableName: pp_article > columns: > id: > title: { type: varchar(255), required: true } > > ArticleCategoryRelation: > tableName: pp_article_category_relation > columns: > id: > article_id: { type: integer, required: true } > category_id: { type: integer, required: true } > foreignKeys: > - > foreignTable: pp_article > onDelete: cascade > references: > - { local: article_id, foreign: id } > - > foreignTable: pp_category > onDelete: cascade > references: > - { local: category_id, foreign: id } > > I inspected the generated forms for this example and they don't seem to > include any many-to-many funcionality. For example, there's no widget to > select categories an article belongs to. The same applies to filter forms. > > Am I missing something, or is this functionality simply not implemented in > symfony? > > Regards, > Rytis > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---