Hi good people, does prisma provides option to al...
# orm-help
t
Hi good people, does prisma provides option to alias columns in the query builder? Or should I construct a raw query? Here is an example. I’d like to alias
email_event
to
events
?
r
Hey @tadejstanic šŸ‘‹ Unfortunately this is not possible with Prisma currently and there's a feature request here for the same. It would be great to add a šŸ‘ on the request so that we can prioritize this. The workaround would be as you suggested, using a raw query.
šŸ‘Œ 2
n
Note that you can just rename the relation fields inside the Prisma schema to change the name of the field in the Prisma schema since it doesn't manifest in the database, that's explained in the docs here šŸ™‚
t
@Ryan thx. Added šŸ‘ to the request, since I also think the schema should more or less reflects what is in the DB and adding there any kind of modifications can confuse other devs on the project.
šŸ’Æ 2