Return-Path: Delivered-To: apmail-db-torque-user-archive@www.apache.org Received: (qmail 26911 invoked from network); 16 Nov 2006 19:29:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Nov 2006 19:29:53 -0000 Received: (qmail 38809 invoked by uid 500); 16 Nov 2006 19:30:02 -0000 Delivered-To: apmail-db-torque-user-archive@db.apache.org Received: (qmail 38795 invoked by uid 500); 16 Nov 2006 19:30:02 -0000 Mailing-List: contact torque-user-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Apache Torque Users List" Reply-To: "Apache Torque Users List" Delivered-To: mailing list torque-user@db.apache.org Received: (qmail 38784 invoked by uid 99); 16 Nov 2006 19:30:02 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Nov 2006 11:30:02 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [81.209.148.146] (HELO dd1212.kasserver.com) (81.209.148.146) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Nov 2006 11:29:48 -0800 Received: from [192.168.2.35] (p54A1662A.dip.t-dialin.net [84.161.102.42]) by dd1212.kasserver.com (Postfix) with ESMTP id 59752C0C0D for ; Thu, 16 Nov 2006 20:29:25 +0100 (CET) Message-ID: <455CBCDE.2050105@manskes.de> Date: Thu, 16 Nov 2006 20:32:46 +0100 From: Michael Manske Reply-To: netseeker@manskes.de User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) MIME-Version: 1.0 To: Apache Torque Users List Subject: Re: Cache problem after delete References: <20061116174223.D5150C3382@home.kc.vicert.com> In-Reply-To: <20061116174223.D5150C3382@home.kc.vicert.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi Ivan, > I use Torque 3.0 with Postgres and have following problem: 3.0 is a little bit out-dated, isn't it? ;-) > After deleting some concrete object with usual > ClassNamePeer.doDelete(objectToDelete), I can still see it in database when > querying for that objects information with plain JDBC. That should not happen, as long as you don't use Connection con = Transaction.begin("myDB"); ClassNamePeer.doDelete(objectToDelete, con); and did not commit the transaction via Transaction.commit(con); > I suppose that Torque has some delayed deletion mechanism No, Torque has not such a mechanism - the record should be deleted immediately as long as no other process holds a lock on the record or table. Checking for locks on the table could be a good idea. We were facing a similiar behaviour with Oracle some time ago: While using the doDelete() and doUpdate() methods, sometimes it took long time until Oracle told the client that it has detected a lock. Perhaps you are facing a similiar situation with Postgres? cheers Michael Ivan Ivankovic schrieb: > Hi, > > > > I worked with Torque only for past 2 weeks, and I found it very useful. > > > > I use Torque 3.0 with Postgres and have following problem: > > After deleting some concrete object with usual > ClassNamePeer.doDelete(objectToDelete), I can still see it in database when > querying for that objects information with plain JDBC. > > > > When I use any of Torque query methods, via Criteria or retrieveByPK(key), > object seems to be erased, but some parts of application I am working on use > JDBC so I can't rewrite all code to use Torque > BasePeer.executeQuery(queryString). Database data for this object can also > be seen from Squirrel JDBC browser which of course uses plain JDBC. > > > > I suppose that Torque has some delayed deletion mechanism and I need some > way to make him do the actual deletion completely from database. Is there > some kind of "flush" to achieve this? > > > > Regards, > > Ivanko > > > > > ------------------------------------------------------------------------ > > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.0.409 / Virus Database: 268.14.6/535 - Release Date: 15.11.2006 --------------------------------------------------------------------- To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org For additional commands, e-mail: torque-user-help@db.apache.org