Re: QueryBySQL

"Dennis Bekkering" <[email protected]> Tue, 24 Jul 2007 19:39:40 +0200
Newsgroups gmane.comp.jakarta.ojb.user
Message-ID <[email protected]>
Hi, you could create a view and map that on a class that represents that
view, then you dont need QueryBySQL.

regards,
Dennis

2007/7/24, krupa <[email protected]>:
>
>
> Hi All,
>
> I have several SQLs already written.
>
> I want to use QueryBySQL to use the existing SQLs. The problem I am facing
> is how do I map the result set of these queries to my java classes,
> especially if I have a result set that includes fields from 3 tables
> then how do I map this in the reposity.xml file?
>
> Please help me with this.
>
> here is an example of my SQL statement.
>
>
> select A1.field1, A1.field2, A1.field3,A2.field1,
> A2.field2,A2.field3,A2.field4,
>   A3.field1 as tmp1, A3.field2 as tmphdr2
> from (((Table1
>    left outer join table2 on field1= field2)
>    left outer join table2 A2 on field2 = A2.field2)
>    left outer join table2 A3 on field5= A3.field2)
>    left outer join table2 A4 on field6 = A3.field2
> where field1= 12
>   and field8 = ''A''
>   order by field9
> ;
>
> Thanks,
> Krupa
>
>
> --
> View this message in context:
> http://www.nabble.com/QueryBySQL-tf4137474.html#a11768006
> Sent from the Apache DB - ObjectRelationalBridge Users mailing list
> archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>


-- 
mvg,
Dennis