uuid's being inferred as strings
When I use InferModel on a table that has a uuid type, I see that the column gets inferred as a string instead of as a uuid type. Seems like the migrations are correctly using the native postgres uuid type, so confused why it's not being returned as a UUID
3 Replies
TypeScript doesn't have a dedicated type for UUID, so it's represented as a string.
hmmm so the right way to do it would be to use something like zod to validate / generate the typescript types? guessing this will make sense once Select schema goes live
It depends on your use case, but in general yes, the ORM doesn't validate the values you pass to it at runtime, only on type level