Type error on query with select field (although query runs successfully) #15615
Labels
bug/2-confirmed
Bug has been reproduced and confirmed.
kind/bug
A reported bug.
team/client
Issue for team Client.
topic: client types
Types in Prisma Client
topic: reserved words
See https://www.prisma.io/docs/reference/api-reference/prisma-schema-reference#naming-conventions
topic: type-clash
Milestone
Bug description
I'm having the following query:
and although the query returns the expected results like:
I get a type error in Visual Studio Code on the top
select
part stating:which results in more type errors downstream as the
seasonDrivers
var cannot be typed anymore; which also means auto-completion is not working anymore.Probably it is related to the
constructor
name used as field.Note that however I can query my constructor table without any problems like
const constructors = await prisma.constructor.findMany({..})
so it is not a general problem to use the name
constructor
.Even a similar query using a nested
constructor
field like below gives no type error at all:How to reproduce
.
Expected behavior
No response
Prisma information
Here is a part of the Prisma schema.
If needed I can share the full schema.
Environment & setup
Prisma Version
The text was updated successfully, but these errors were encountered: