Hi people, I hope this is the right place to ask t...
# orm-help
j
Hi people, I hope this is the right place to ask this question. Is there any reason why the prisma client wouldn't give me access to a model I've declared in the prisma schema? I have 3 models in the schema (user, movie, entry), and in nest I can access the movie model by injecting the client into the service and calling
this.prisma.movie...
. The weird thing is that I did exactly the same thing as I did with the movies service with the other two, but I can only access the movie model. I would really appreciate if anyone can help, I've been going a bit crazy over this :D
prisma generate
and
prisma migrate
run without any issues and the tables are successfully created for all of the 3 models
r
@Jesus Jimenez 👋 Have you explicitly specified the type of the injected service?
j
Hi Ryan! I think so, this is what I have for the movies service (the one that works correctly) and for the users (the one that doesn't work)
movies
users
r
And how is
PrismaService
defined?
j
this is how it's defined on nestjs documentation
r
Looks fine to me. Are you using a monorepo or generating Prisma in a different folder?
j
I don't think so, this is the link to the repo if it makes things easier 🙂 https://github.com/j-jmnz/mi-db-api
👍 1
r
Checking
Works fine for me 🙂 Could you run
prisma generate
and check? This might be an editor issue as well.
j
oh god it is as you said, just an editor issue, I was going mad over this, really, thanks for your help :D
💯 1