propelorm/sfPropelORMPlugin — Issue #88: Form Generation : M2M false recognition
Author: jaugustin
Created: 2011-10-13 16:36:48+00:00
State: open

Hi,

Today the Form generator automaticaly detect Many to Many relation:

```
A table is considered to be a m2m table if it has 2 foreign keys that are also primary keys.
```

It generate multiple list in the form for table related to a M2M.

Or if the M2M contain extra fields (another PK field or other fields) it should'nt generate the multiple liste because it will never work and break the table.

https://github.com/propelorm/sfPropelORMPlugin/blob/master/lib/generator/sfPropelGenerator.class.php#L66

I think it should test that the table has only 2 fields.

I could try to provide a PR