Hi all :)

Is support for JBossQL planned in XDoclet? So far it appears I can only use
specific declared (declarative) SQL queries to be generated into
jbosscmp-jdbc.xml by using the @jboss:finder-query element.

In JBoss 3 however you can now declare queries in JBossQL which is a
superset of EJB QL with added parameters for LIKE and IN and support for
ORDER BY plus dynamic queries. For example you can have a query declaration
like the following in jbosscmp-jdbc.xml :

<entity>
        <ejb-name>OrderEJB</ejb-name>
        <query>
                <query-method>
        
<method-name>ejbSelectOrderToZipCodesLike</method-name>
                        <method-params>
        
<method-param>java.lang.String</method-param>
                        <method-params>
                </query-method>
                <jboss-ql>
                        SELECT DISTINCT OBJECT(o) FROM OrderData AS o WHERE
o.shippingAddress.zip LIKE ?1 ORDER BY o.shippingAddress.zip
                </jboss-ql>
        </query>
</entity>

It would be nice to have this in the template.

Later,
Bernie

_______________________________________________
Xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to