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
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