P
Prisma•5w ago
DH

When using createManyAndReturn, am I guaranteed the results order to be the same as of the input?

When using createManyAndReturn, am I guaranteed the results order to be the same as of the input?
3 Replies
Nurul
Nurul•5w ago
Hey 👋 no, because databases do not explicitly guarantee that themselves. The order of the returned data from createManyAndReturn() is not guaranteed to match the order of the input data. You would need to use orderBy to get a guaranteed order
DH
DHOP•5w ago
ok, thanks!
Nurul
Nurul•5w ago
No worries! 🙂

Did you find this page helpful?