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

fix(psql): save bookmarks not using passed bookmark id for the insert #484

Merged
merged 10 commits into from
Oct 9, 2022

Conversation

fmartingr
Copy link
Member

@fmartingr fmartingr commented Oct 4, 2022

PGDatabase.SaveBookmarks was not using the (mandatory) bookmark.ID field on inserts since it was only assuming the returning ID was the same that CreateNewID provided in the handlers.

I've removed the checks and modified the query to return the inserted ID which is later used in relations with tags.

Also added a simple test case, since we need to start doing those!

Fixes #215 #385

@fmartingr fmartingr self-assigned this Oct 4, 2022
book.ID was not being used, so inserts were failing.
the check for book.ID was removed and it is filled with the returning
id from the insert query
@fmartingr fmartingr marked this pull request as ready for review October 4, 2022 09:11
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

Successfully merging this pull request may close these issues.

"failed to save bookmark"
1 participant