Hi Krupa,

If you want to have returned fields of more than one table, you have to use
the

ReportQueryByCriteria

have a look here:
http://db.apache.org/ojb/docu/guides/query.html#Report+Queries

To specify the joins the only way I use is to specify the relationship in
the repository.xml.

Anyway in the class ReportQueryByCriteria there is  a method *
setJoinAttributes*<http://db.apache.org/ojb/api/org/apache/ojb/broker/query/ReportQueryByCriteria.html#setJoinAttributes%28java.lang.String%5B%5D%29>
(java.lang.String[] joinAttributes)

I Hope this helps


On 11/13/07, k jee <[EMAIL PROTECTED]> wrote:
>
> Hi All,
>
> How can I write the following query in OJB?
>
> SELECT * FROM Table1 AS t1JOIN table2 AS t2 ON t1.fld1 = t2.fld1 AND
> t1.fld2= t2.fld2 AND t1.fld3= 1
>
> Thanks,
> Krupa
>
>
> ---------------------------------
> Be a better pen pal. Text or chat with friends inside Yahoo! Mail. See
> how.

Reply via email to