<@U6F3Y893K> You need to read / get the data in th...
# orm-help
k
@fondfolio You need to read / get the data in the same order they were inserted?
f
@KJReactor Yes, that's right
@KJReactor do you know if that’s possible?
k
@fondfolio Well yeah. This can be done in several ways. Just choose a field that is sequential and and matches the order of insertion - automatic id index, date or etc.
then you can have something like
Copy code
prisma.[entity].findMany({
 orderBy: {
   [sequentialFieldName]: "[desc or asc]"
 }
})
In your case, you would want to use ascending, "asc", order
c
@KJReactor the issue is we don’t have a sequential field.
k
In that case add one that makes sense for you and your use case but a good one can be adding a date field. You are most likely to find such date fields created for that very purpose named something like createdAt