Arnór
Arnór
PPrisma
Created by Arnór on 6/12/2024 in #help-and-questions
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' }]
}
}
})
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?
4 replies