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

        
_______________________________________________
seam-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/seam-issues

Reply via email to