Hi Thomas, I just patched the template Object.vm to provide the missing connection parameter.
What is the appropriate way to provide this patch? Tobias -----Ursprüngliche Nachricht----- Von: Thomas Fischer [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 6. Juli 2007 08:48 An: Apache Torque Developers List Betreff: RE: Missing connection parameter Hi Tobias, I had similar problems a year or two ago. The solution was to use the torque.silentDbFetch generator parameter. The idea is that all db fetches of foreign relations must be done explicitly with the get(connection) methods; the get() methods only return the cached results This gives you full control over what you fetch from db with which connection. The downside of full control ist that you have to exercise it, i.e if you want to make a deep copy, you have to fetch the related objects beforehand by calling the corresponding get(connection) methods. Nevertheless In my opinion a copy(connection) method would be useful. A patch would be welcome. Thomas "Tobias Hilka" <[EMAIL PROTECTED]> schrieb am 05.07.2007 18:26:16: > Hello, > > I was checking our application to see if within a single transaction all calls > to torque use the methods with the additional Connection parameter. Doing this > I found some problems within Torque: > > - The method copy(boolean) does not take a connection as parameter. This might > lead to a deadlock if you use deepcopy and you have foreign keys to other > tables. The methods get...() are called, not the methods get...(Connection). > - Same problem with the add… methods when you add a new object which is > referenced by a foreign key. > > We really had some troubles in our application with the “convenience” methods > (the one without connection). To do clean programming, we need the methods to > take an additional connection parameter. > > > Thanks, > > Tobias >
smime.p7s
Description: S/MIME cryptographic signature
