corcube
corcube
TTCTheo's Typesafe Cult
Created by corcube on 7/24/2023 in #questions
Prisma MySQL findMany problem with chirp tutorial
So my experience is in raw JS and PHP etc, and I have been trying the chirp tutorial to dive into this tech stack. I started chirp about 2.5 months ago before some work commitments called me away. I am now back giving it another try with a fresh install and I am STUMPED. Previously I managed to get posts appearing and had started styling (let's just say, I got up to about 30 mins in through the tutorial https://www.youtube.com/watch?v=YkOSUVzOAA4). Currently I have fallen a bit short of that because I continually get an error from prisma regarding the findMany query. Note: I'm going a bit different from the tutorial by using my own local mysql server and am using authjs instead of clerk. Also note the first version of chirp I made used prisma v4.11.0 while this recent attempt uses v5.0.0.
prisma:error
Operation 'findMany' for model 'Post' does not match any query.
prisma:error
Operation 'findMany' for model 'Post' does not match any query.
(Full error below) So naturally I thought I had a typo. Nope. I made sure to previously do a prisma db push. I checked the database to ensure the tables and content were pushed correctly. I then compared against my previous attempt (which works) and found the code the exact same minus some changes to t3-app in the past months (esp. in how index.ts was presented, however, the impacts of these changes appeared negligible). Bouncing ideas and tests around the most logical thing would be a change to a library that stopped it working - logically prisma. I could find nothing that should impact the code. On a whim I decided to change prisma from my mysql instance to an sqlite instance. A quick db push and restart and now everything is working fine without changing any of the code, only the prisma schema provider from mysql to sqlite and the url. So... can someone explain what is happening and how I can fix it since I'm a big ol' n00b with this tech. Otherwise, if some more experienced prisma folks can replicate this, is this a bug that prisma might need to know about?
5 replies