Scott/Rodney,
Let me also interject that you can have multiple Torque objects mapped 
to the same table. For example, you can have a summary object with only 
a few columns (as in a summary or partially populated case).  The trick 
I've found to make this work is to make sure the summary definitions 
appear in the schema xml file prior to the full table definition and 
make sure you give the summary table a unique java name.  So you can 
have something like StreetSummary mapped to your street table and Street 
mapped to the same table.  StreetSummary needs to be first so any FK 
relationships map to the full definition (apparently Torque parses top 
to bottom and remembers the last table name). Anyway, I've used this 
teqhnique to avoid writing JDBC or dropping down to lower layers of the 
Torque stack.

HTH,
David

Rodney Schneider wrote:

>On Thu, 17 Oct 2002 03:36, you wrote:
>
>  
>
>>Actually, I have no street table (and don't want
>>one)...I actually want to figure out how to get
>>a list of streets out of the location table...
>>
>>(If I had a street table, you are correct, it's
>>easy to do...do you have a solution when there
>>is not a street table)?
>>    
>>
>
>Hi Scott,
>
>Unfortunately, a Torque business object (in your case Location) is always 
>populated with all columns/attributes of the table it maps to.  This means 
>that you can't work with partially populated business objects in Torque, so 
>you often have to use either Village or JDBC for low level SQL... unless I am 
>misunderstanding your question.
>
>However, OJB supports all this kind of stuff (ie: lazy materialization, 
>proxies etc.), so you might want to evaluate OJB for your application.
>
>Torque doesn't solve all problems, so in practice you will end up writing 
>some Village or JDBC code if you decide to use Torque.
>
>Regards,
>
>-- Rodney
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>
>  
>




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to