Skip to content

Unable to insert new Conference via CLI #54886

Discussion options

You must be logged in to vote

Ok so I think your original issue is that the sequence created by Doctrine is not used as DEFAULT for your ID, which would match doctrine/dbal#3619 (comment).

Still, you should configure your strategy as SEQUENCE, because the PostgreSQL IDENTITY strategy will change when you upgrade DBAL to v4 (see https://github.com/doctrine/orm/blob/4.0.x/UPGRADE.md#deprecated-reliance-on-the-non-optimal-defaults-that-come-with-the-auto-identifier-generation-strategy)

So, you’d have to get the sequence’s next value by yourself (using SELECT NEXTVAL('conference_id_seq')) and assign it to the ID.

But in fact the ORM would do it for you if you used it. Why do you want to insert rows by hand?

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@MatTheCat
Comment options

Answer selected by VitaliyMarkelov
@VitaliyMarkelov
Comment options

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