You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by Arinaya Khalsa <ar...@realidea.ca> on 2004/09/22 17:19:10 UTC

Select from multiple tables

Hi All,

I have a search results screen where data is pulled from two different
tables, the second one however is linked via two other tables, so I need
to select across four tables in all. What is the most elegant way to do
this using Torque?

Lets call them Table1, Table2, Table3 and Table4.

Table2 has FKs pointing to Table1 and Table3; Table3 has a FK pointing
to Table4. I need to display data from Table1 and one column from Table4
in the jsp. It seems like it would be easiest to do multiple selects and
return two different result Lists to the jsp, and loop thru them in
parallel. Is there a better way?

I am new to Torque and would really appreciate some help!

Thanks,

Arinaya



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org