[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-2393) Query order by regexp fails when using lower/upper on a column

Darryl Smith (JIRA) jira-events at lists.jboss.org
Tue Jan 8 22:38:43 EST 2008


    [ http://jira.jboss.com/jira/browse/JBSEAM-2393?page=comments#action_12394252 ] 
            
Darryl Smith commented on JBSEAM-2393:
--------------------------------------

The fix for this is:

Pattern.compile( "^\\s*(?:(?:((?:lower|upper){1}+\\s*\\(\\s*(?:\\w)+(?:\\.\\w+)*\\s*\\))|(?:\\w)+(?:\\.\\w+)*)(?:\\s*(?:asc|desc)+)?(?:\\s*,\\s*)?)+\\s*$" );





> Query order by regexp fails when using lower/upper on a column
> --------------------------------------------------------------
>
>                 Key: JBSEAM-2393
>                 URL: http://jira.jboss.com/jira/browse/JBSEAM-2393
>             Project: JBoss Seam
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: 2.0.0.GA
>            Reporter: Darryl Smith
>
> In o.j.s.framework.Query
> private static final Pattern ORDER_CLAUSE_PATTERN = Pattern.compile("^[\\w\\.,\\s]*$");
> while this works with simple cases e.g. v.jobTitle asc
> it fails on lower(v.jobTitle) asc, is the proper way to order by a character field on many databases

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list