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

Issue fork drupal-3345197

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

joachim created an issue. See original summary.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

_shY made their first commit to this issue’s fork.

_shy’s picture

Status: Active » Needs review

Updated descriptions for the loadByProperties() and buildPropertyQuery()
Hopes, the tests will not fail =)

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Needs Review Queue Initiative

Grammatically makes sense to me.

joachim’s picture

Status: Reviewed & tested by the community » Needs work

pradhumanjainOSL made their first commit to this issue’s fork.

_shy’s picture

Status: Needs work » Needs review

Updated description according to the last comments. Let's discuss it =)

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Think the updates make sense and all threads have been answered

_shy’s picture

Hey guys!
Are any additional changes required here?

joachim’s picture

Looks good, but there is a backlog of RTBC issues at the moment.

longwave’s picture

Status: Reviewed & tested by the community » Needs work

Made a suggestion to the updated text.

_shy’s picture

Status: Needs work » Needs review

Now the description should look better, thanks @longwave

joachim’s picture

Status: Needs review » Reviewed & tested by the community

Looks good!

longwave’s picture

Status: Reviewed & tested by the community » Needs work

One more little formatting tweak but otherwise we are good here.

_shy’s picture

Status: Needs work » Needs review

Changed description formatting. Tests are passed. We are ready to review =)

joachim’s picture

Status: Needs review » Reviewed & tested by the community
_shy’s picture

Updated MR.

quietone’s picture

Assigned: Unassigned » quietone

I'm triaging RTBC issues. I read the IS and the comments. I didn't find any unanswered questions or other work to do.

Leaving at RTBC.

Assigning to myself to commit sometime in the next day or two.

  • quietone committed 6edfeb38 on 11.x
    Issue #3345197 by _shY, pradhumanjain2311, joachim, longwave:...

  • quietone committed bd142d03 on 10.2.x
    Issue #3345197 by _shY, pradhumanjain2311, joachim, longwave:...
quietone’s picture

Committed to 11.x. Also to 10.2. because this is an " API documentation improvement"

Thanks!

quietone’s picture

Version: 11.x-dev » 10.2.x-dev
Assigned: quietone » Unassigned
Status: Reviewed & tested by the community » Fixed

Forgot to change status.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.