I've never used this feature, but it appears that this is a mechanism for allowing the Driver to manage (or interact with the database as it manages) keys. So if the Driver won't manage it, you are left with two options:
1) let the Database manage keys
2) do it yourself.
Option 1 is like what Jeanne was describing. You write the query including some database specific code that gets the dtabase to insert the next generated value as the statement is inserted. I tend not to use this since the queries are database specific and I've never trusted the
thread safety - how do you guarentee that the value you read back is the one you wrote and not a record someone else wrote? Without the primary key it's a bit disconnected.
Option involves getting the key from an external key generator before you insert the data into the database. This is the way I tend to use it for several reasons. Firstly, you already have the primary key so you don't have to go looking for it. Secondly, the mechanism for generating the key can be 'pluggable' ie you can have multiple key generation strategies and plug in the one you need for this particular application. It may be one of several database-specific key generation strategies, an incrementing counter, or some fancy distributed key generator. It doesn't really matter. Yes, you may need two database operations to get the next key value then insert the record, but you'd be doing that if you had to load the key in a second select operation.
Just my thoughts.
Dave.