table not being camelcased when using joins?
For some reason when I use the following query:
I am geting the following type back:
Why is the name of the table not being camel cased?
8 Replies
Can you show your schema?
I believe, by default it gives you back the names you applied in the schema definition
@angelelz verified that within my schema I don't use snakecase anywhere.
You can always rename the returning object to whatever you want in the select method
export const productSnapshot = pgTable("product_snapshot",
its right there@mr_pablo_85 correct me if I'm wrong but inside the pgTable method, you're supposed to add the actual name of the table in Postgres. Thus using snakecase is fine there (or even preferred since postgres doesn't preserve casing). The same goes with columns. Example from the docs:
https://orm.drizzle.team/docs/sql-schema-declaration
SQL schema declaration – DrizzleORM
Drizzle ORM | %s
Possible bug?
Yeah I think so too
any update on this? encountering the same problem and was wondering if there's a way without specifying in the select()