Skip to content

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

Description

@floppydisken

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions