This looks like a nice technique. A couple of questions:
What's the DML for the id field?
What's the SQLite equivalent? (If there is one.)
Aren't Oracle sequences safe to use unlocked from within a transaction? I was under the impression that they do work that way, so I can request a sequence and then use it. Obviously slower than what you do above, but a little more straightforward. Hmmmm, is your id just that, a sequence?