I've been relying on the docs.
Here's another problem: I just went to make the update, however there is also a discrepancy as to what the force parameter means. The docs have 'force' as third, and say:
If we need to chose the value for the ID field, we can do so by using the $force = true
In fact I've written several modules with this assumption, where I insert objects that each user can only have one of using their uid as the object id. They are happily running in production passing 'false' as the third parameter. However, DBUtil.class.php itself says something completely different:
* @param object The object we wish to insert
* @param tablename The tablename key for the PNTables structure
* @param idcolumn The column which stores the primary key (optional) (default='id')
* @param preserve whether or not to preserve existing/set standard fields (optional) (default=false)
* @param force whether or not to insert empty values as NULL (optional) (default=false)
"Force" is not only in a different place, but means something completely different !
Now I can make a wild leap of logic, and say that if you pass false as the idcolum, then DBUtil will assume there is no id column, which is why everything I wrote works. Or, if it sees a value it knows what to do. Or, the whole problem is passed off to
SQL which knows enough not to assign something if you pass a value in. Or, it's a bug that just happens to work for Mysql, but will break in something else.
I don't know which scares me more: Writing DBUtil docs with my limited knowledge that someone else might rely on, or the thought that I might be an expert in DBUtil !