eloquent-driver
eloquent-driver copied to clipboard
Reorder collection does not working
Hey, i'm using statamic 3.2.37 with eloquent driver and i'm having this issue https://github.com/statamic/cms/issues/3620
any idea how to solve this ?
Should be solved by the all models PR
I have recently switch Statamic to use a database. I have the same issue when trying to reorder a collection. Do you have any update on that issue ? @enespolat24
Sadly no. still looking for a solution
Can you check this against the new v1? I think this issue can be closed.
Looks like the entries are being reordered correctly. For example, if you were to output them on the frontend. However in the CP the listing immediately reverts to being sorted by title. This doesn't happen when using a fresh install with the stache driver.
I'm able to reproduce and I'm not seeing it re-ordering correctly anywhere, even on the front end.
We'll need to update EntryQueryBuilder to orderBy the order in the tree - so select the tree, get the ids then order by field (but this is MySQL specific).
The other option would be to get all entries then defer to OrderedQueryBuilder... but this means less processing on the database side so its not ideal.
sorry for the late reply, yes the issue is still present with v1 eloquent-driver
@enespolat24 see if this PR fixes it... https://github.com/statamic/eloquent-driver/pull/57
sorry for the late reply, still have issues. when i hit the save button it reverts new order as it was before