loadByProperties() and buildPropertyQuery() should document that you can pass value arrays to get an IN query condition

Created on 1 March 2023, over 1 year ago
Updated 11 January 2024, 5 months ago

Problem/Motivation

   * @param array $values
   *   An associative array of properties of the entity, where the keys are the
   *   property names and the values are the values those properties must have.

buildPropertyQuery() does this:

      // Cast scalars to array so we can consistently use an IN condition.
      $entity_query->condition($name, (array) $value, 'IN');

So even if a property takes scalar values, you can pass in an array for the query value and it will produce an IN condition.

This should be documented.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Fixed

Version

10.2

Component
Documentation 

Last updated about 13 hours ago

No maintainer
Created by

🇬🇧United Kingdom joachim

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024