geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Boynes <jboy...@apache.org>
Subject Re: Adding EJB-QL to CMP beans
Date Thu, 21 Apr 2005 23:56:08 GMT
Katia Aresti Gonzalez wrote:
> Thank you Jeremy!
> 
> Katia
> 
>  >From: Jeremy Boynes <jboynes@apache.org>
>  >Reply-To: user@geronimo.apache.org
>  >To: user@geronimo.apache.org
>  >Subject: Re: Adding EJB-QL to CMP beans
>  >Date: Thu, 21 Apr 2005 08:09:09 -0700
>  >
>  >Katia Aresti Gonzalez wrote:
>  >>Hi everybody!!
>  >>  Im migrating a program with 3 CMP Beans. The thing it that to use
>  >>de container managed persistence, i need to add EJB-QL, because the
>  >>examples, all of them have finAll() or findByPromaryKey, and these
>  >>doenst give any problems, the problems are the other select.
>  >>  What do I need to add EJB-QL support for CMP sql selects??
>  >>thank you very much for your help!
>  >>
>  >
>  >Assuming you have the basic fields mapped, you should just be able
>  >to specify the EJB-QL in the standard deployment descriptor; we will
>  >automatically convert that to the appropriate SQL.
>  >

We chatted a little on IRC - Katia's EJB's are 1.x so there is no way to 
specify the query in the standard DD.

Instead, we support this by allowing EJB-QL from 2.x to be used in the 
app-server specific deployment plan for a 1.x bean e.g.

    </resource-ref>
    <query>
       <query-method>
          <method-name>findAll</method-name>
          <method-params />
       </query-method>
       <ejb-ql>SELECT OBJECT(u) FROM UsuarioEJB as u</ejb-ql>
    </query>

--
Jeremy

Mime
View raw message