db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Fox <Thomas....@seitenbau.net>
Subject RE: created torque 4 branch with village removed
Date Mon, 01 Nov 2010 14:52:28 GMT
> Question:  Can we still do generic record queries or is this limited
> to only Torque table records?  E.g., generate "Select t1.col1,
> t2.col1, ... from t1, t2 where..." using Criteria, then call
> something similar to BasePeer.doSelect(c) and process the results.
> I know this has been a common answer to "Can torque do this..."
> queries in the past.

Yes, one can. There is the org.apache.torque.om.mapper.ObjectListMapper
which will return a List of object lists. Either one can tell the Mapper
which classes should be used for the columns (database independent), or one
can let the db driver decide if one does not care about database
independence. See e.g. the
org.apache.torque.util.SummaryHelperTest.testSummarize() method in the test
project for an example.

   Thomas


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


Mime
View raw message