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 RE: Oracle, Torque and PreparedStatements - Potential Patch of Peer.vm
Date Fri, 05 Dec 2003 17:23:15 GMT
Here it is ..

--- Peer.vm     Fri Dec 05 18:22:02 2003
+++ Peer_patch.vm       Fri Dec 05 17:06:49 2003
@@ -1561,4 +1561,30 @@
         return Torque.getDatabaseMap(DATABASE_NAME).getTable(TABLE_NAME);
     }
   #end ## ends if (!$table.isAlias())
+
+  ## ------------------------------------------------------------
+  ## 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;
+    }
 }

-----Original Message-----
From: Martin Poeschl [mailto:mpoeschl@marmot.at]
Sent: Friday, December 05, 2003 6:05 PM
To: Apache Torque Users List
Subject: Re: Oracle, Torque and PreparedStatements - Potential Patch of
Peer.vm


please create patches using diff -u

thanx

martin

Göschl,Siegfried wrote:

>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
>
>Cheers,
>
>Siegfried Goeschl
>
>===============================================================
>
>PEER.VM
>
>  ## ------------------------------------------------------------
>  ## 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
>
>
>
>  
>



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


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


Mime
View raw message