insert statement no longer returns row id

Created on 18 July 2023, over 1 year ago
Updated 21 August 2023, over 1 year ago

Updating from 4.3.1 to 4.3.2 of the sqlsrv module the insert statement is no longer returning the id of the row but just the number 1.

So in version 4.3.2 (Drupal 9.5.10) when I run this statement

  $id = $connection->insert('history')
    ->fields([
      'status' => 'testing',
      'change' => 'test1',
    ])
    ->execute();

The value of $id is 1.

But in the version before 4.3.1 (Drupal 9.5.10)

The value returned is the id of the row that was inserted which is 9160

🐛 Bug report
Status

Closed: cannot reproduce

Version

4.3

Component

Code

Created by

🇨🇦Canada erichomanchuk

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @erichomanchuk
  • Status changed to Closed: cannot reproduce over 1 year ago
  • 🇨🇦Canada erichomanchuk

    I tested the update again today and it seems to be working. Not sure what happened on the Server / Local but was only getting the value 1 returned from an insert. Perhaps some sort of caching issue on my end.

Production build 0.71.5 2024