globalid icon indicating copy to clipboard operation
globalid copied to clipboard

Support for using GlobalID with configurable columns

Open tylerwillingham opened this issue 1 year ago • 2 comments

I currently work in an application that's using auto-incremented primary keys for GIDs and would like to migrate to using our external_id columns that we've started adding to various models. We can sidestep rails/globalid and do this if we need to, but I sensed in #135 that there may be an appetite from others for this kind of thing.

I think this is achievable/configurable on a per-model basis pretty cleanly so I'll put up a PR with some passing tests and get a sense for what the maintainers think

tylerwillingham avatar Aug 23 '24 22:08 tylerwillingham

Nkann

Kamilove137 avatar Sep 19 '24 02:09 Kamilove137

Hi

Kamilove137 avatar Sep 19 '24 02:09 Kamilove137

@tylerwillingham did you end up monkey-patching this? We have a similar situation, with friendly_id and with a preference to not provide database primary key IDs to our customers.

DaanVanVugt avatar Aug 27 '25 13:08 DaanVanVugt

@DaanVanVugt no, we're using signed, unexpiring GIDs in many places now.

I think this is a better direction for our use case and it doesn't seem that novel. I'd be happy to continue to pursue it if there were any signal from the maintainers

tylerwillingham avatar Aug 27 '25 13:08 tylerwillingham