Skip to content

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

@floppydisken

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?

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