I tried to search the archived mail for this, but didn't have any luck.
I'm trying to find an example of using a subselect through criteria
statements.  Does anyone have an example?  
 
A simple example of actual sql I'm trying to represent would look
similar to:
 
SELECT name
     FROM resource
   WHERE resourceTypeID in (SELECT id
                                                   FROM resourceType  
                                                 WHERE description like
'Portlet')
 
I know I can flatten this query out into a straight join, but that is
not my first choice.  What I ended up doing was adding the whole
subselect as a criteria.custom.  Is that the best method?
 
Also I'm using Torque 2.1, with the 'native' IdMethod.  Does any one
know if 'native' is supported in 2.1.  My code works if I define it as
'sequence' for Oracle or 'autoincrement' for MSSQL, but I would rather
just use 'native' and not have to have a copy of the schema for each
target.
 
Thanks in advance.


Reply via email to