Hello sir
i am using declared sql as i have to run subquery
my declared-sql query is like this :-
|
| <query>
| <query-method>
| <method-name>findByMaxContactInfoId</method-name>
| <method-params/>
| </query-method>
| <declared-sql>
| <select>
| <field-name> CONTACTINFOID</field-name>
| <alias>o</alias>
| </select>
| <from>,RACONTACTINFO</from>
| <where> o.contactInfoId IN
| <select>
| <additional-columns>MAX(CONTACTINFOID)
</additional-columns>
| <alias>g</alias>
| </select>
| <from>, RACONTACTINFO </from>
| </where>
| </declared-sql>
| </query>
| /code]
| i am using JBOSS 4.0.0 jdk 1.4
| But showing following exception
|
|
| | org.jboss.deployment.DeploymentException: The field-name element of declared-sql
select is only allowed for ejbSelect queries
| |
|
| how can i resolve this ??
| even jboss 3.2.6 shows the same exception
|
| my original query is like this
|
| | SELECT OBJECT(o) FROM RaContactInfo AS o WHERE o.contactInfoId IN (SELECT
MAX(p.contactInfoId) FROM RaContactInfo AS p
| |
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4201657#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...