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

Implement FieldRelation search criterion

    XMLWordPrintable

    Details

      Description

      Currently, it is not possible to search for Content related (through RelationList) to a specific Content.

      In Legacy, this criterion would basically add an additional join to table ezcontentobject_link.

      $query = new Query();
      $query->criterion = new Criterion\RelationList(
          // Field name
          "relation_field",
          // Operator
          Operator::EQ,
          // Content ID
          42
      );
      $result = $this->getRepository()->getSearchService()->findContent( $query );
      

      Or:

      $query = new Query();
      $query->criterion = new Criterion\RelationList(
          // Field name
          "relation_field",
          // Operator
          Operator::IN,
          // Content ID
          array( 42, 43, 44 )
      );
      $result = $this->getRepository()->getSearchService()->findContent( $query );
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              patrick.allaert@ez.no Patrick Allaert (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 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 hours, 45 minutes
                  2h 45m