Hi John,
Thanks for the reply.
For the below query, can you provide a sample using SQLTemplate?

1. how to use the SQLTemplate to execute the below query?
SELECT um.ID,
       um.FIRST_NAME,
       um.LAST_NAME,
       ua.ROLE_ID,
       tt.TASK_ASSIGNED_DATE,
       tt.TASK_CLOSED_DATE,
       tt.TASK_MASTER_ID
  FROM t_user_master um,
       t_user_allocation_details ua,
       t_task_assignment_detail ta,
       t_task_transaction_detail tt
 WHERE     um.ID = ua.USER_ID
       AND ta.USER_ID = um.ID
       AND ta.TASK_TRANSACTION_ID = tt.ID
       AND um.ID = 112;
2. how to read the data from the result set or List?

Appreciate your help.

Thanks,
Sampath Uppula



-----Original Message-----
From: John Huss [mailto:[email protected]] 
Sent: Thursday, December 13, 2012 2:50 AM
To: [email protected]
Subject: Re: Problem in fetching the data from multiple tables with 
relationships.

I'm not really sure what your question is.  Cayenne will fetch all of the
fields that are modeled and turn them into objects.  And you can add
prefetching paths to your SelectQuery to pre-fetch the related objects,
otherwise they will be loaded when accessed.  If you want to write your own
SQL and get a HashMap of the data you can use SQLTemplate instead of
SelectQuery.

John

============================================================================================================================Disclaimer:
  This message and the information contained herein is proprietary and 
confidential and subject to the Tech Mahindra policy statement, you may review 
the policy at <a 
href="http://www.techmahindra.com/Disclaimer.html";>http://www.techmahindra.com/Disclaimer.html</a>
 externally and <a 
href="http://tim.techmahindra.com/tim/disclaimer.html";>http://tim.techmahindra.com/tim/disclaimer.html</a>
 internally within Tech 
Mahindra.============================================================================================================================

Reply via email to