Attempting to do a join with a LIKE operand in a Views filter plugin. The query looks similar to below; however, when it executes, the LIKE operand is not taken into account and the join is done with '='. Is there a way to do this type of join?
$configuration = [ 'type' => 'INNER', 'table' => 'path_alias', 'field' => 'CONCAT(\'%\', path_alias.path)', 'left_table' => 'redirect', 'left_field' => 'redirect_redirect__uri', 'operator' => 'LIKE',]; $join = Views::pluginManager('join')->createInstance('standard', $configuration); $this->query->addRelationship('path', $join, 'path_alias');
This is the query we are trying to execute:
SELECT * FROM redirect AS redirect INNER JOIN path_alias AS path ON redirect.redirect_redirect__uri LIKE CONCAT('%', path.path);