-
1. Re: IN operator, JBoss support this operator?
madsmart Jan 30, 2003 3:41 PM (in response to madsmart)Hi,
Please need help, maybe this topics help you...
Two beans, this is my relation:
<ejb-relation-name>NavigationTree-Areas</ejb-relation-name>
<ejb-relationship-role>
<ejb-relationship-role-name>NavigationTree</ejb-relationship-role-name>
Many
<cascade-delete/>
<relationship-role-source>
<ejb-name>NavigationTree</ejb-name>
</relationship-role-source>
<cmr-field>
<cmr-field-name>areaId</cmr-field-name>
</cmr-field>
</ejb-relationship-role>
<ejb-relationship-role>
<ejb-relationship-role-name>AreaId</ejb-relationship-role-name>
One
<relationship-role-source>
<ejb-name>Areas</ejb-name>
</relationship-role-source>
<cmr-field>
<cmr-field-name>navigationTree</cmr-field-name>
<cmr-field-type>java.util.Collection</cmr-field-type>
</cmr-field>
</ejb-relationship-role>
</ejb-relation>
and this is my query:
<query-method>
<method-name>findAllNavigationTreeByAreaAndLanguage</method-name>
<method-params>
<method-param>java.lang.Integer</method-param>
<method-param>java.lang.Integer</method-param>
</method-params>
</query-method>
<ejb-ql>SELECT Object(o) FROM NavigationTree AS o, IN (o.areaId) as t, IN (o.languageId) as r WHERE t.areaId = ?1 AND r.languageId = ?2</ejb-ql>
and I get an error:
org.jboss.deployment.DeploymentException: Error compiling ejbql; - nested throwable: (org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "o.areaId" atline 1, column 50.
Was expecting:
<COLLECTION_VALUED_PATH>...
Why doesn't the query don´t work? can you help me?
Regards.
MAD