]
Gavin King closed JBSEAM-1864.
------------------------------
Fix Version/s: 2.0.0.CR1
Resolution: Done
Assignee: Gavin King
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
Assigned To: Gavin King
Priority: Trivial
Fix For: 2.0.0.CR1
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/queryhq...
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: