Use upsert instead of merge in \Drupal\content_lock\ContentLock\ContentLock::lockingSave()

Created on 11 June 2025, about 2 months ago

Problem/Motivation

We use ->merge when we could use ->upsert for the query as it is more performant.

Proposed resolution

Convert merge to an upsert. Less queries FTW.

Remaining tasks

User interface changes

None

API changes

None

Data model changes

NOne

πŸ“Œ Task
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom alexpott πŸ‡ͺπŸ‡ΊπŸŒ

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

Comments & Activities

  • Issue created by @alexpott
  • πŸ‡¬πŸ‡§United Kingdom alexpott πŸ‡ͺπŸ‡ΊπŸŒ

    Upsert class says:

    This class can only be used with a table with a single unique index.

    That's not the case here... so we have to continue with the merge.

Production build 0.71.5 2024