In reverse engineering a MySql database, I discovered that there are apparently several tables in which there is an integer ID column that is autoIncrement but is not a primaryKey:
<column name="id" phpName="Id" type="INTEGER" autoIncrement="true" required="true"/>
This causes quite a nice crash during a build in src/Propel/Generator/Builder/Om/ObjectBuilder.php->addDoInsertBodyRaw() on line 4839:
...since the table has an autoincrementing key, but the 'primaryKey' $column is null. It would seem that there should be a check somewhere before it crashes, either as a post-generation check on the reverse engineering, or a build preflight of the schema.xml file, or an exception thrown at the point of failure.
Simply ensuring that an autoIncrement column is also a primryKey column is the quick fix, once I figured out what was going on:
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
Good catch. Feel free to submit a PR if you get to it before we do.
Fixed #564 - build crashes when no primaryKey on autoIncrement column