db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Göschl,Siegfried" <Siegfried.Goes...@drei.com>
Subject Oracle, Torque and PreparedStatements - Potential Patch of Peer.vm
Date Fri, 05 Dec 2003 16:17:01 GMT
Hi folks,

we recently had a discussion about Torque and problems with Oracle - it seems to have problems
with ad-hoc SQL statements filling up an internal buffer. There is BasePeer.doPSSelect() which
returns a List of Village Records.

The following patch could return "proper" TORQUE objects. Have a look at it since it is a
quick hack and I already had a cup of mulled wine ... ;-) ... and will have a second one before
I do more patches ... :-O


Siegfried Goeschl



  ## ------------------------------------------------------------
  ## Patch by Siegfried Goeschl
  ## ------------------------------------------------------------

     * Do a Prepared Statement select according to the given criteria
     * @param criteria
     * @return Result as Torque generated objects and NOT Village Records
     * @throws TorqueException Any exceptions caught during processing will be
     *         rethrown wrapped into a TorqueException.
    public static List doPSSelectEx(Criteria criteria) throws TorqueException
     	List v = null;
     	List temp = null;
    	// add the columns to the criteria
    	$basePrefix${table.JavaName}Peer.addSelectColumns( criteria );
    	// invoke the BasePeer to get the list of Village Records
    	temp = $basePrefix${table.JavaName}Peer.doPSSelect( criteria );
    	// convert the VillageRecords into Torque objects
	v = $basePrefix${table.JavaName}Peer.populateObjects( temp );
	return v;

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

View raw message