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

_getIdentitySql for postgres misaligns with actual id of inserted entity #265

Open
floppydisken opened this issue Oct 4, 2022 · 0 comments

Comments

@floppydisken
Copy link

floppydisken commented Oct 4, 2022

I noticed wrong return of ids when inserting venues into a postgres database.

The identity SQL is off by one in my case. Specifically the select lastval() as id is causing the issue. Somehow lastval has gone out of sync in my development environment as well as the production environment. The cause is unknown.

Switching the lastval() strategy out with "returning id" resolves the issue and returns the correct value. Is there a reason this strategy is not preferred?

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