logoalt Hacker News

konartlast Monday at 6:22 PM1 replyview on HN

>Before you know it, someone's relying

Do not expose your internal IDs. As simple as that.


Replies

dparklast Monday at 6:35 PM

This came up in the last two threads I read about uuidv7.

This is simply not a meaningful statement. Any ID you expose externally is also an internal ID. Any ID you do not expose is internal-only.

If you expose data in a repeatable way, you still have to choose what IDs to expose, whether that’s the primary key or a secondary key. (In some cases you can avoid exposing keys at all, but those are narrow cases.)

show 1 reply