[seam-issues] [JBoss JIRA] Created: (JBSEAM-4761) Regexp Query.SUBJECT_PATTERN does not accept DISTINCT

Michael Keuchen (JIRA) jira-events at lists.jboss.org
Thu Jan 6 08:51:17 EST 2011


Regexp Query.SUBJECT_PATTERN does not accept DISTINCT
-----------------------------------------------------

                 Key: JBSEAM-4761
                 URL: https://issues.jboss.org/browse/JBSEAM-4761
             Project: Seam
          Issue Type: Bug
          Components: Framework
    Affects Versions: 2.2.1.CR3
         Environment: http://fisheye.jboss.org/browse/Seam/branches/community/Seam_2_2/src/main/org/jboss/seam/framework/Query.java?r=11979
            Reporter: Michael Keuchen


The current pattern in org.jboss.seam.framwork.Query

   private static final Pattern SUBJECT_PATTERN = Pattern.compile("^select\\s+(\\w+(?:\\s*\\.\\s*\\w+)*?)(?:\\s*,\\s*(\\w+(?:\\s*\\.\\s*\\w+)*?))*?\\s+from", Pattern.CASE_INSENSITIVE); 

does not accept queries using the keyword DISTINCT, for example:

 SELECT DISTINCT vehicle FROM VEHICLE vehicle ...

Proposal:

Change the pattern to

"^select\\s+((distinct)?\\s+\\w+(?:\\s*\\.\\s*\\w+)*?)(?:\\s*,\\s*(\\w+(?:\\s*\\.\\s*\\w+)*?))*?\\s+from"


-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the seam-issues mailing list