PgEnum Error on relation
error: column "xxxxxxxxxxxxxxx_name" of relation "xxxxxxxxxxxxxxxx" does not exist
I cannot understand why i get this error.
![No description](https://cdn.answeroverflow.com/1313958726520274954/Untitled_design2.png)
![No description](https://cdn.answeroverflow.com/1313958726897500170/Untitled_design3.png)
7 Replies
try this
is there a reason why drizzle doesnt just grab the key name instead of having you passing a string with the name?
i just remembered having this problem a few months ago and this solved it
as for your question, i think the issue with mapping could be this: https://orm.drizzle.team/docs/sql-schema-declaration#camel-and-snake-casing
Drizzle ORM - Schema
Drizzle ORM is a lightweight and performant TypeScript ORM with developer experience in mind.
oh that's really interesting, didn't know that was a thing thanks!
so for example, instead of mapping
wholesalerName
as wholesaler_name
, it might be mapping it to wholesalername
, probablyRemoves alot of headackes, cuz i sometimes change the key names and forget to change the strings
if you wanted to do that you could just do {"first_name": something}, but yea it works
yes, I finally found it out
you must add keys even for FK