#1485: Doctrine_Query_Where: Allow "a.field REGEXP '^[a-z]*$'" and "'testext'
REGEX a.regexp_field"
-----------------------------------+----------------------------------------
 Reporter:  chrisschu              |       Owner:  romanb
     Type:  enhancement            |      Status:  new   
 Priority:  minor                  |   Milestone:        
Component:  Query/Hydration        |     Version:  1.0   
 Keywords:                         |    Has_test:  0     
 Mystatus:  Pending Core Response  |   Has_patch:  0     
-----------------------------------+----------------------------------------
 Currently where conditions allow the following format:

 {{{[fieldname] [operator] [value]}}}

 This works great for =, <, >, ..., because the condition a = b is the same
 as b = a. But for regular expressions the order is important. Either the
 database field contains the text to check against a regular expression or
 the database field contains the regular expression itself:

 {{{"a.text_field REGEXP '^[a-z]*$'" or "'testext' REGEX a.regexp_field"}}}

 At the moment Doctrine allows:

 {{{$query->addWhere('a.text_field REGEXP ?', array($regexp));}}}

 But not:

 {{{$query->addWhere('? REGEXP a.regexp_field', array($text));}}}

 Thanks!

-- 
Ticket URL: <http://trac.doctrine-project.org/ticket/1485>
Doctrine <http://www.phpdoctrine.org>
PHP Doctrine Object Relational Mapper
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"doctrine-svn" group.
 To post to this group, send email to [email protected]
 To unsubscribe from this group, send email to [EMAIL PROTECTED]
 For more options, visit this group at 
http://groups.google.co.uk/group/doctrine-svn?hl=en-GB
-~----------~----~----~----~------~----~------~--~---

Reply via email to