Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ordering issue #452

Open
talmroth opened this issue Oct 14, 2024 · 0 comments
Open

ordering issue #452

talmroth opened this issue Oct 14, 2024 · 0 comments

Comments

@talmroth
Copy link

talmroth commented Oct 14, 2024

void DBHelper::insertComicsInReadingList(const QList<ComicDB> &comicsList, qulonglong readingListId, QSqlDatabase &db)

I think the logic for ordering is flawed. In looking at the code a count is done on the table and the new row is added with an ordering of row count + 1. The problem is if you delete anything from the middle of the list and then add something to the list it gets inserted with an ordering that is not at the end since the rowcount is now lower than the highest ordering value.

I think this is true of all the insert routines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant