3 ms·
Exactly. I never expose my database Id's to the outside world but generate a random token for each of my objects that has to be. This token is then translated t
by pan69 12y ago
Exactly. I never expose my database Id's to the outside world but generate a random token for each of my objects that has to be. This token is then translated to a database Id which is then used from then on. This allows for the greatest flexibility.
- zackbloom 12y agoThat's not going to be the most efficient option, as it means all your indexes need to include both the primary key, and this secondary id. I would encourage you to think about just using the random token as the primary key.
- ninjaplease 12y agoWhat on earth? Are you going to be changing object ids? Is knowing an object's id an attack vector? Sounds like you are doing it wrong.