> > Actually, just to make sure we're all on the same page, the database and > > table defaultIdMethod attributes don't have any affect on which columns > > have autoincrement. A column must explicitly declare autoIncrement=true > > for it to have autoincrement functionality. > > > > Why? It may work this way for generating the sql on some databases which > a recent patch has fixed for mysql at least. Maybe my memory is > incorrect and I should look it up, but I don't think any code in > BasePeer is using the autoIncrement flag. It assumes if there is an > idMethod specified that there will only be one pk. > > I do not see any reason to have multiple pk columns in a table with only > one or some of them being generated. It's either one pk that can be > generated or "none or multiple pks" and none are generated.
Okay, I see how this all makes sense. I was just assuming what I thought the functionality of defaultIdMethod/idMethod was instead of taking the time to look through the code and figure it out. Because the autoIncrement is not referenced, can we remove the attribute to force new users to learn what exactly defaultIdMethod/idMethod do instead of assuming the wrong thing as I did? Granted, it'd let people easily use autoIncrement on columns that aren't primary keys, but I can't really see this happening (since we're going with a best-practice approach) and they could always put in the same type of functionality explicitly instead of relying on Torque to autogenerate it. - Stephen -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
