piedra
DTDrizzle Team
•Created by piedra on 10/7/2023 in #help
`returning` does not allow arguments according to typescript
1 replies
DTDrizzle Team
•Created by piedra on 10/7/2023 in #help
how to disambiguate query relations
Hi everyone, I'm currently facing an issue with the Query API where I don't understand how to disambiguate a foreign key. I have the following schema:
as you can see users can have many sent and received transactions, but
many
offers no way to reference a field like one
does, so I'm not sure how to build the users relations for this case. Ideally I would love to be able to query a list of users with their sent or received transactions.
For example, in Prisma I would be able to set the reference name in the CoinsTransaction
model and then use the same name for the relations in the User
model, like they do here: https://www.prisma.io/docs/concepts/components/prisma-schema/relations#disambiguating-relations.
Thanks!2 replies