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

[5.2] Work around lack of lastInsertId() for ODBC with PDO for MSSQL #13423

Merged
merged 4 commits into from
May 6, 2016
Merged

[5.2] Work around lack of lastInsertId() for ODBC with PDO for MSSQL #13423

merged 4 commits into from
May 6, 2016

Conversation

darksaboteur
Copy link
Contributor

When using the ODBC driver for MSSQL an exception is thrown because the PDO driver does not implement lastInsertId().
This works around that by making an SQL call to return the id when using ODBC.

@GrahamCampbell GrahamCampbell changed the title Work around lack of lastInsertId() for ODBC with PDO for MSSQL [5.2] Work around lack of lastInsertId() for ODBC with PDO for MSSQL May 4, 2016
@@ -3,6 +3,7 @@
namespace Illuminate\Database\Query\Processors;

use Illuminate\Database\Query\Builder;
use Exception;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please order these by length

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shortest first?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, fixed.

@taylorotwell taylorotwell merged commit a084356 into laravel:5.2 May 6, 2016
@vlakoff
Copy link
Contributor

vlakoff commented Jun 24, 2016

Refs #14121 which brings 2 fixes for this feature.

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.

4 participants