Details
-
Improvement
-
Resolution: Fixed
-
High
-
5.1, 5.2-beta1
-
None
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 );