[DBAL-534] RLIKE Created: 29/May/13  Updated: 29/May/13  Resolved: 29/May/13

Status: Resolved
Project: Doctrine DBAL
Component/s: None
Affects Version/s: None
Fix Version/s: None
Security Level: All

Type: Bug Priority: Major
Reporter: Petter Castro Assignee: Marco Pivetta
Resolution: Invalid Votes: 0
Labels: RLIKE


I am trying to use RLIKE in my query but I am getting an error.

This is how I am trying to retrieve my data:

$query = $this->em->createQuery("
FROM User p
WHERE p.firstName RLIKE :param ");
$query->setParameter("param", $param);

And this is the error I am getting:

Error: Expected =, <, <=, <>, >, >=, !=, got 'RLIKE'

How should I use the RLIKE?


Comment by Marco Pivetta [ 29/May/13 ]

RLIKE is not supported by the ORM - you may want to implement a custom DQL function as described in http://www.doctrine-project.org/blog/doctrine2-custom-dql-udfs.html

You may also find a list of available implementations of various MySQL specific DQL functions at https://github.com/beberlei/DoctrineExtensions/tree/master/lib/DoctrineExtensions/Query/Mysql

Generated at Sat Oct 10 03:10:16 EDT 2015 using JIRA 6.4.10#64025-sha1:5b8b74079161cd76a20ab66dda52747ee6701bd6.