-
|
How should I generate a cursor for a column with descending order by default? For example let cakes = cake::Entity::find()
.cursor_by(cake::Column::Id)
.order_by_desc(cake::Column::Id)
.all(db)
.await?;This creates a query like |
Beta Was this translation helpful? Give feedback.
Answered by
billy1624
Jun 19, 2023
Replies: 1 comment 2 replies
-
|
Hey @uedaeita, you can use the |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
uedaeita
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey @uedaeita, you can use the
lastmethod to paginate the result in descending order.https://docs.rs/sea-orm/latest/sea_orm/struct.Cursor.html#method.last