Skip to content

Fix insert not using $primaryKey on Postgres #244

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

Closed
wants to merge 1 commit into from
Closed

Fix insert not using $primaryKey on Postgres #244

wants to merge 1 commit into from

Conversation

Bering
Copy link

@Bering Bering commented Feb 3, 2013

Just pass the name of the key as a second parameter to insertGetId(). The function already knows how to use it, the key was just not passed to it so it was defaulting to "id".

For example:
INSERT INTO questions ... RETURNING id

Becomes:
INSERT INTO questions ... RETURNING question_id

@taylorotwell
Copy link
Member

Fixed this manually as there was a unit test that also needed to be updated.

joelharkes pushed a commit to joelharkes/framework_old that referenced this pull request Mar 7, 2019
dbpolito pushed a commit to dbpolito/framework that referenced this pull request Oct 1, 2019
gonzalom pushed a commit to Hydrane/tmp-laravel-framework that referenced this pull request Oct 12, 2023
Set DB_CONNECTION env variable to Queue failed default database
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.

3 participants