PrismaP
Prisma2y ago
3 replies
Arnór

Ordering of createMany items

When you use the
create
method and include a createMany, does Prisma guarantee the ordering of the items created? Or can they get created out of order?

Eg. given the following:

prismaClient.opinion({
  name: 'something',
  favorite_fruit: {
    createMany: {
      data: [{ name: 'tomato' }, { name: 'orange' }]
    }
  }
})


in the above example, is the 'tomato' entry guaranteed to be created before the 'orange', or are they created potentially out of order?
Was this page helpful?