Omit not working for me
I am trying to use Omit to return the object with the id field removed:
However when returned it still shows the id on the objects. I could add all the fields I want directly in the select() here but that seems like a lot of work.
3 Replies
Omitting a field at the type level doesn't omit it in during runtime, you have to use javascript to omit it.
I nice way to do this is as described here: https://orm.drizzle.team/docs/goodies#get-typed-table-columns
Goodies - DrizzleORM
Drizzle ORM | %s