Hi!
Could anyone tell me what is wrong with EJB-Ql? I am using
JBoss jboss-3.2.2RC2.
I am always getting the following exception:
Depends On Me: org.jboss.deployment.DeploymentException: Error compiling EJB-QL
statement 'SELECT OBJECT(a) FROM Account a, IN (a.customer) AS c WHERE c.id = ?
1>'; - nested throwable: (org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encoun
tered "a.customer" at line 1, column 40.
Was expecting:
<COLLECTION_VALUED_PATH> ...
)]
******************ejb-jar.xml*************************************
<query>
<query-method>
<method-name>findByCustomer</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
</query-method>
<ejb-ql>SELECT OBJECT(a) FROM Account a, IN (a.customer) AS c WHERE c.id = ?1></ejb-ql>
</query>
...
<ejb-relation>
<ejb-relation-name>CustomerHasAccounts</ejb-relation-name>
<ejb-relationship-role>
<ejb-relationship-role-name>Customer</ejb-relationship-role-name>
<multiplicity>One</multiplicity>
<relationship-role-source>
<ejb-name>Customer</ejb-name>
</relationship-role-source>
<cmr-field>
<cmr-field-name>accounts</cmr-field-name>
<cmr-field-type>java.util.Collection</cmr-field-type>
</cmr-field>
</ejb-relationship-role>
<ejb-relationship-role>
<ejb-relationship-role-name>Account</ejb-relationship-role-name>
<multiplicity>Many</multiplicity>
<relationship-role-source>
<ejb-name>Account</ejb-name>
</relationship-role-source>
<cmr-field>
<cmr-field-name>customer</cmr-field-name>
</cmr-field>
</ejb-relationship-role>
</ejb-relation>
*******************************************************
Thank you!