DBAL-534: RLIKE #1741

doctrinebot opened this Issue May 29, 2013 · 2 comments

2 participants


Jira issue originally created by user pcastrotigre:

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?



Comment created by @ocramius:

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


Issue was closed with resolution "Invalid"

@doctrinebot doctrinebot added the Bug label Dec 6, 2015
@Ocramius Ocramius was assigned by doctrinebot Dec 6, 2015
@doctrinebot doctrinebot closed this Dec 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment