Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-21516

Field criterion: unable to query ezselection using Multiple Choice.

    XMLWordPrintable

Details

    Description

      Using a content class with a 'selection' field, a search can be performed with the Field Criterion:

      $query = new Query();
      $query->criterion = new Criterion\Field( 'selection_single', Criterion\Operator::EQ, $valueIndex );
      

      However, it the selection type is 'Multiple choice', this search criterion does not work (no results are returned).

      It seems that it is possible to query only by the first option using the 'IN' operator:

      $query = new Query();
      $query->criterion = new Criterion\Field( 'selection_multiple', Criterion\Operator::IN, array( (int)$valueIndex) );
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            joao.inacio-obsolete@ez.no Joao Inacio (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 days, 5 hours
                2d 5h