You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently an UUID is always stored as a VARCHAR(36), but since UUIDs are just hex values with seperators, they could be stored in a BINARY(16).
Describe the solution you'd like
An option in the Column annotation like preferBinary
Essentially any datatype could be stored in a binary field when marshalling it before, the question is whether this is an actual use-case. If really needed in any project it could probably already be implemented using a TypeMapper.
@x7airworker What are your thought's on this and how realistic do you see this use-case?
Sure I definitely understand that but would anyone every do this? It makes the data pretty unreadable for humans so searching for an id in the database isn't trivial anymore.
Activity
JanHolger commentedon Aug 31, 2023
Essentially any datatype could be stored in a binary field when marshalling it before, the question is whether this is an actual use-case. If really needed in any project it could probably already be implemented using a TypeMapper.
@x7airworker What are your thought's on this and how realistic do you see this use-case?
x7airworker commentedon Aug 31, 2023
@JanHolger The actual use case would be to save disk space, because a
BINARY(16)is smaller than aVARCHAR(36). See https://stackoverflow.com/questions/28251144/inserting-and-selecting-uuids-as-binary16 for reference.JanHolger commentedon Sep 1, 2023
Sure I definitely understand that but would anyone every do this? It makes the data pretty unreadable for humans so searching for an id in the database isn't trivial anymore.