[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1864) Entity-query of Contact List sample does not run against Oracle

Ali Sadik Kumlali (JIRA) jira-events at lists.jboss.org
Sat Aug 25 18:30:18 EDT 2007


Entity-query of Contact List sample does not run against Oracle
---------------------------------------------------------------

                 Key: JBSEAM-1864
                 URL: http://jira.jboss.com/jira/browse/JBSEAM-1864
             Project: JBoss Seam
          Issue Type: Feature Request
          Components: Examples
    Affects Versions: 2.0.0.BETA1
         Environment: OS: Windows Vista 6.0,x86
Database: Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
Java VM: Java HotSpot(TM) Server VM 1.5.0_11-b03,Sun Microsystems Inc.
Seam: jboss-seam-2.0.0.BETA1
            Reporter: Ali Sadik Kumlali
            Priority: Trivial


Hi,

Using concat() expression instead of '+' would make "contacts" entity-query of Contact List example more portable according to the Hibernate Reference[1]. Otherwise, the sample cannot be run against Oracle due to "ORA-01722: invalid number" error. Here is the query I could manage to run on both HSQLDB and Oracle:

    <fwk:entity-query name="contacts" 
               max-results="5">
        <fwk:ejbql>from Contact</fwk:ejbql>
        <fwk:order>lastName</fwk:order>
        <fwk:restrictions>
            <value>lower(firstName) like lower( concat(#{exampleContact.firstName}, '%' ))</value>
            <value>lower(lastName) like lower( concat(#{exampleContact.lastName}, '%') )</value>
        </fwk:restrictions>
    </fwk:entity-query>


Regards,

Ali Sadik Kumlali


[1] http://www.hibernate.org/hib_docs/entitymanager/reference/en/html/queryhql.html



-- 
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