[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


 Description   

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("
SELECT p
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?

Thanks.



 Comments   
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 Fri Dec 19 15:51:44 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.