Thanks a lot for all of your answers. Now I understand wh I had duplicate entries in another table ;)
I tried to use the function .copy(false) but apparently this one does not exists (I'm using torque 3.2-rc2) :( Alain Greg Monroe wrote: > > I remember there was a discussion a while back on the deep > copy stuff. I recall that the underlying logic for making > this the default was related to a copied object not being > a "true" copy (as defined by the Java specs?) unless the > associated complex objects were copied. But my memory's > prone to parity errors occationally... > > Anyway, if you don't care about a copy being exact to > the level of the related objects, you can use: > > newRecord = record.copy(false); > > This will do a simpler and faster copy. If you use the > copy to get related objects, only then will the cache > be refilled. > > If you're code is slowing down with more data, turning > on logging for Torque is a good idea. The logs will have a > short version of all queries done and the time it took. This > can let you quickly find the expensive queries that you need > to look at. Generally, this means that you probably need > to add an index or two on the where clause values. > >> -----Original Message----- >> From: Federico Fissore [mailto:[EMAIL PROTECTED] >> Sent: Thursday, April 12, 2007 10:48 AM >> To: Apache Torque Users List >> Subject: Re: Torque is very slow to do a .copy of an object :( Why? >> >> Hidde Boonstra [Us Media] ha scritto: >> > Hi, >> > >> > sorry, but I think that's what I mean:-) So if you have object1 and >> > object2 which references to object1 and you do a copy on object1 it >> > will also copy and add all object2 instances that refer to >> object1. It >> > looks like this is recursive, because objects that refer to object2 >> > will probably be copied as well... >> > >> > Hope this helps to explain your slowdown, >> > >> > Hidde. >> > >> >> You may also want to turn on debugging on package >> org.apache.torque and see how many and what queries are you >> actually doing by copying your object. You may find that >> number surprising. >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > Duke CE Privacy Statement > Please be advised that this e-mail and any files transmitted with it are > confidential communication or may otherwise be privileged or confidential > and are intended solely for the individual or entity to whom they are > addressed. If you are not the intended recipient you may not rely on the > contents of this email or any attachments, and we ask that you please not > read, copy or retransmit this communication, but reply to the sender and > destroy the email, its contents, and all copies thereof immediately. Any > unauthorized dissemination, distribution or copying of this communication > is strictly prohibited. > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Torque-is-very-slow-to-do-a-.copy-of-an-object-%3A%28-Why--tf3565099.html#a9973353 Sent from the Apache DB - Torque Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]