[jboss-user] [JBoss Seam] - Seam Framework EntityQuery restrictions does not work for My

lkw do-not-reply at jboss.com
Tue Apr 17 11:47:55 EDT 2007


Hi,

I'm a newbie in Seam.  Appreciate if someone can help on this.

I run the contactlist example from Seam version 1.2.1 .  Everything works if I use HSQLDB.  I'm able to do pagination and restriction with the EntityQuery framework.  However, the restrictions does NOT work when I switch to MySql database.  Has anyone encounter this problem?

My configuration is as below:

components.xml

<?xml version="1.0" encoding="UTF-8"?>
  | <components xmlns="http://jboss.com/products/seam/components"
  |             xmlns:fwk="http://jboss.com/products/seam/framework"
  |             xmlns:core="http://jboss.com/products/seam/core"
  |             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  |             xsi:schemaLocation=
  |                 "http://jboss.com/products/seam/framework http://jboss.com/products/seam/framework-1.2.xsd 
  |                  http://jboss.com/products/seam/core http://jboss.com/products/seam/core-1.2.xsd 
  |                  http://jboss.com/products/seam/components http://jboss.com/products/seam/components-1.2.xsd">
  | 
  |     <factory name="contact" value="#{contactHome.instance}"/>
  |     <fwk:entity-home name="contactHome" 
  |              entity-class="Contact"/>
  |      
  |     <fwk:entity-query name="contacts" 
  |                max-results="20">
  |         <fwk:ejbql>from Contact</fwk:ejbql>
  |         <fwk:order>lastName</fwk:order>
  |         <fwk:restrictions>
  |             <value>lower(firstName) like lower( #{exampleContact.firstName} + '%' )</value>
  |             <value>lower(lastName) like lower( #{exampleContact.lastName} + '%' )</value>
  |         </fwk:restrictions>
  |     </fwk:entity-query>
  |     
  |     <component name="exampleContact"
  |               class="Contact"/>
  | 
  | </components>
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4038017#4038017

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4038017



More information about the jboss-user mailing list