[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-4251) Query component is evaluating EL expressions defined in ejbql attribute incorrectly

Jacob Orshalick (JIRA) jira-events at lists.jboss.org
Tue Jun 16 13:39:56 EDT 2009


Query component is evaluating EL expressions defined in ejbql attribute incorrectly
-----------------------------------------------------------------------------------

                 Key: JBSEAM-4251
                 URL: https://jira.jboss.org/jira/browse/JBSEAM-4251
             Project: Seam
          Issue Type: Bug
          Components: Framework
    Affects Versions: 2.1.2.GA
            Reporter: Jacob Orshalick
            Assignee: Jacob Orshalick
            Priority: Minor


EL expressions defined in an EntityQuery definition in components.xml such as:

<fwk:entity-query name="persons" max-results="5">
  <fwk:ejbql>select p from Person as p where p.age > #{example.age}</fwk:ejbql>
</fwk:entity-query>

are being evaluated at the time the EntityQuery is created and the ejbql String is set to:

select p from Person as p where p.age > 0

This is happening because the EntityQuery component defines the ejbql attribute as a String.  This means the attribute is evaluated as a ValueExpression before being set into the component causing all EL to be resolved and returning the resulting String.

The fix is to define the ejbql attribute as a ValueExpression and then use the getExpressionString() method to retrieve the original String when parsing the ejbql.

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

        



More information about the seam-issues mailing list