You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating schemas for a model ("MyModel") the MyModelCreateManySchema schema will have a data property that points to the schema MyModelCreateManyInputObjectSchema.
MyModelCreateManyInputObjectSchema is defined to be an object with the model fields and not an array of objects.
As the name implies I'm expecting this to be the input that corresponds to the prisma model.createMany input. But they do not match since the zod-schema does not accept array of objects.
How to reproduce
Create any Prisma model.
Generate schemas.
Look in generated/schemas/createMany<modelname>.schema.ts and generated/schemas/objects/<modelname>CreateManyInput.schema
Expected behavior
<modelname>CreateManyInputObjectSchema should be a schema for an array of objects of type
Prisma information
Not specific for my schema will be same for any.
Environment & setup
OS: Windows
Database: Postgres
Node.js version: 18.12.1
Prisma Version
4.7.0
The text was updated successfully, but these errors were encountered:
Bug description
When creating schemas for a model ("MyModel") the
MyModelCreateManySchema
schema will have adata
property that points to the schemaMyModelCreateManyInputObjectSchema
.MyModelCreateManyInputObjectSchema
is defined to be an object with the model fields and not an array of objects.As the name implies I'm expecting this to be the input that corresponds to the prisma
model.createMany
input. But they do not match since the zod-schema does not accept array of objects.How to reproduce
generated/schemas/createMany<modelname>.schema.ts
andgenerated/schemas/objects/<modelname>CreateManyInput.schema
Expected behavior
<modelname>CreateManyInputObjectSchema
should be a schema for an array of objects of typePrisma information
Not specific for my schema will be same for any.
Environment & setup
Prisma Version
The text was updated successfully, but these errors were encountered: