Hey I’m looking to do the following exactly like i...
# orm-help
r
Hey I’m looking to do the following exactly like in the thread below https://prisma.slack.com/archives/CKQTGR6T0/p1616949553483900 Since this was during prisma2, is there a query to finally sort contact by the most recent message now?
👀 1
a
Hey Rohan 👋, Using
queryRaw
is still the best way forward, as far as I know. Prisma allows ordering by relations, but when using a list of relations, you can only order by the relation
_count
. There’s a related feature request here, feel free to add a 👍 and your specific use case.
r
Hey @Austin Sorry for the late reply, didnt get any notification of the same. Yeah I guess
queryRaw
is what I’ll have to do since I also have to implement an infinite scroll in my case so that is definitely not possible right now. Have upvoted and left a comment on the issue tho, thanks!