Fishie
12/15/2021, 10:35 AMnikolasburk
Channel
but only one back-relation field on Message
. Every relation in Prisma always needs to be defined on both sides, so you need to add another field to Message
to match the latestMessage
field on Channel
. This page in the docs probably is also relevant: https://www.prisma.io/docs/concepts/components/introspection#disambiguating-relationsFishie
12/15/2021, 10:46 AMnikolasburk
i really dont know what i would call the field in the Message model since it will basically always return the same thing as the “channel” field in the Message model hmmFair enough! I think something like
channelForLatestMessage
could be an appropriate name, but I get your point that in this case the field seems somewhat superfluous… If that’s bothering you a lot, you’re more than welcome to create a GitHub issue or drop a comment in this one: https://github.com/prisma/prisma/issues/2018Fishie
12/15/2021, 10:55 AMchannelForLatestMessage Channel? @relation("channelForLatestMessage")