Skip to content

Suggestion: generate IDs in the same format as UUID #2

Description

@radmen

toID() method sorts generated id and returns it in a non-uuid format (eg. 11e7-a9d1-48fb57a0-bcd7-81ecee726a36).

Once its saved in Postgres UUID column Postgres will re-format this value into UUID canonical representation (11e7a9d1-48fb-57a0-bcd7-81ecee726a36).

In terms of Postgres it doesn't matter in which format the uuid will be passed. It will accept both of them.

However, this can be a problem when generated id is used both in a Postgres DB and different storage (in my case it is Mongo).

What I'd like to suggest is to change the format of the id generated by toID() to be exact as UUID canonical representation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions