4 ms·
> This way you can change the record's UUID at any time to display different data without having to worry about updating a bunch of internal foreign keys. That
by perlgeek 7y ago
> This way you can change the record's UUID at any time to display different data without having to worry about updating a bunch of internal foreign keys.
That is true, but changing the UUID is also likely to break a lot of assumptions that your users make. If your user indexes your forum posts, for instance, and you change the UUIDs, they'll re-index posts with new UUIDs as new posts, and send end users to now invalid UUIDs until the old index entries are evicted.
- aaronharnly 7y agoYeah, I thought that line was weird. It's more like – you can change the record's internal foreign key without breaking your users! Once users have bookmarks, IDs more or less permanent.
- Jwarder 7y agoNaturally it depends on the data. I've used it when we want to show the most recent version of a record on the public website but we want to keep older copies of of the data to reference with past events. Eg customer's current address can always be identified with id x but the address records for specific past orders reference other records.