Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Security Level: All
    • Labels:

      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.

        Activity

        Hide
        Marco Pivetta added a comment -

        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

        Show
        Marco Pivetta added a comment - 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

          People

          • Assignee:
            Marco Pivetta
            Reporter:
            Petter Castro
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: