Thursday, November 22, 2001 01:24 AM
My personal opinion: since I like to have portable solution, I don't normally like to use the autoincrement fields or sequences that are handled by the database, because when it happens to switch from one db to another these features can be handled in a different way or, even. they aren't present at all.
There are many interesting patterns you can use for solving this problem, and I've used a couple of them. You can find interesting solutions here:
There is also this other interesting solution: GUIDs without Singletons and Databases